Skip to content

Commit

Permalink
sysfs: just use d_materialise_unique()
Browse files Browse the repository at this point in the history
same as for nfs et.al.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 14, 2012
1 parent 469796d commit e77fb7c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,14 +793,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
}

/* instantiate and hash dentry */
ret = d_find_alias(inode);
if (!ret) {
d_add(dentry, inode);
} else {
d_move(ret, dentry);
iput(inode);
}

ret = d_materialise_unique(dentry, inode);
out_unlock:
mutex_unlock(&sysfs_mutex);
return ret;
Expand Down

0 comments on commit e77fb7c

Please sign in to comment.