kernfs: use lookup_one_len_unlocked()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 11 Apr 2016 12:42:55 +0000 (08:42 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 2 May 2016 23:47:21 +0000 (19:47 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/kernfs/mount.c

index f73541fbe7afadaee17dcb038f7be18c21b4d18f..b5b5f079a7f751c0956abe13e80e38cf18178c09 100644 (file)
@@ -120,9 +120,8 @@ struct dentry *kernfs_node_dentry(struct kernfs_node *kn,
                kntmp = find_next_ancestor(kn, knparent);
                if (WARN_ON(!kntmp))
                        return ERR_PTR(-EINVAL);
-               mutex_lock(&d_inode(dentry)->i_mutex);
-               dtmp = lookup_one_len(kntmp->name, dentry, strlen(kntmp->name));
-               mutex_unlock(&d_inode(dentry)->i_mutex);
+               dtmp = lookup_one_len_unlocked(kntmp->name, dentry,
+                                              strlen(kntmp->name));
                dput(dentry);
                if (IS_ERR(dtmp))
                        return dtmp;