Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380443

[PATCH 02/15] kernfs: use lookup_one_len_unlocked()

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject [PATCH 02/15] kernfs: use lookup_one_len_unlocked()
Date Sat, 16 Apr 2016 03:00:02 +0200
Message-ID <romKC-3oC-9@gated-at.bofh.it> (permalink)
References <romKB-3oC-3@gated-at.bofh.it>
X-Mailer git-send-email 2.7.3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 25
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
X-Original-Date Sat, 16 Apr 2016 01:55:14 +0100
X-Original-Message-ID <1460768127-31822-2-git-send-email-viro@ZenIV.linux.org.uk>
X-Original-References <20160416005232.GV25498@ZenIV.linux.org.uk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1380443

Show key headers only | View raw


From: Al Viro <viro@zeniv.linux.org.uk>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/kernfs/mount.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index b67dbcc..e006d30 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -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;
-- 
2.8.0.rc3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 02/15] kernfs: use lookup_one_len_unlocked() Al Viro <viro@ZenIV.linux.org.uk> - 2016-04-16 03:00 +0200

csiph-web