summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2013-09-10 17:04:25 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-10 18:56:29 -0400
commitda5338c7498556b760871661ffecb053cc6f708f (patch)
treee732503d4fd438b98b6ff89eeafc496beaae3371 /fs
parentbcce56d58543f1b500f6b00baec8e5404b5a5302 (diff)
downloadtalos-obmc-linux-da5338c7498556b760871661ffecb053cc6f708f.tar.gz
talos-obmc-linux-da5338c7498556b760871661ffecb053cc6f708f.zip
Add missing unlocks to error paths of mountpoint_last.
Signed-off-by: Dave Jones <davej@fedoraproject.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 841c8d9286c0..0dc4cbf21f37 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2261,12 +2261,15 @@ mountpoint_last(struct nameidata *nd, struct path *path)
dentry = d_alloc(dir, &nd->last);
if (!dentry) {
error = -ENOMEM;
+ mutex_unlock(&dir->d_inode->i_mutex);
goto out;
}
dentry = lookup_real(dir->d_inode, dentry, nd->flags);
error = PTR_ERR(dentry);
- if (IS_ERR(dentry))
+ if (IS_ERR(dentry)) {
+ mutex_unlock(&dir->d_inode->i_mutex);
goto out;
+ }
}
mutex_unlock(&dir->d_inode->i_mutex);
OpenPOWER on IntegriCloud