Commit da5338c7 authored by Dave Jones's avatar Dave Jones Committed by Al Viro
Browse files

Add missing unlocks to error paths of mountpoint_last.


Signed-off-by: default avatarDave Jones <davej@fedoraproject.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bcce56d5
...@@ -2261,13 +2261,16 @@ mountpoint_last(struct nameidata *nd, struct path *path) ...@@ -2261,13 +2261,16 @@ mountpoint_last(struct nameidata *nd, struct path *path)
dentry = d_alloc(dir, &nd->last); dentry = d_alloc(dir, &nd->last);
if (!dentry) { if (!dentry) {
error = -ENOMEM; error = -ENOMEM;
mutex_unlock(&dir->d_inode->i_mutex);
goto out; goto out;
} }
dentry = lookup_real(dir->d_inode, dentry, nd->flags); dentry = lookup_real(dir->d_inode, dentry, nd->flags);
error = PTR_ERR(dentry); error = PTR_ERR(dentry);
if (IS_ERR(dentry)) if (IS_ERR(dentry)) {
mutex_unlock(&dir->d_inode->i_mutex);
goto out; goto out;
} }
}
mutex_unlock(&dir->d_inode->i_mutex); mutex_unlock(&dir->d_inode->i_mutex);
done: done:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment