[JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup()
Now that JFFS2 can be exported by NFS, we need to get this right.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index b1aaae8..621bdfa 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -108,9 +108,7 @@
}
}
- d_add(target, inode);
-
- return NULL;
+ return d_splice_alias(inode, target);
}
/***********************************************************************/