Skip to content

Commit

Permalink
[JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and Al Viro committed Oct 23, 2008
1 parent c002a6c commit 8966c5e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/jffs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target,
}
}

d_add(target, inode);

return NULL;
return d_splice_alias(inode, target);
}

/***********************************************************************/
Expand Down

0 comments on commit 8966c5e

Please sign in to comment.