From: Al Viro Date: Fri, 8 Jun 2012 00:56:54 +0000 (-0400) Subject: sysfs: just use d_materialise_unique() X-Git-Tag: MMI-PSA29.97-13-9~16195^2~115 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e77fb7cef87856d9d35f2f4d617d0b97148ee7c2;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git sysfs: just use d_materialise_unique() same as for nfs et.al. Signed-off-by: Al Viro --- diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 77c44ce493f8..a5cf784f9cc2 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@ -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;