diff options
| author | Dave Jones <davej@redhat.com> | 2013-09-10 17:04:25 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-10 17:09:32 -0400 |
| commit | bcceeeba9b3ca99c29523bb7af16727f8a837db4 (patch) | |
| tree | e732503d4fd438b98b6ff89eeafc496beaae3371 | |
| parent | 443ed254c32ae9abf2f984038f656f3283aff759 (diff) | |
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>
| -rw-r--r-- | fs/namei.c | 5 |
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) | |||
| 2261 | dentry = d_alloc(dir, &nd->last); | 2261 | dentry = d_alloc(dir, &nd->last); |
| 2262 | if (!dentry) { | 2262 | if (!dentry) { |
| 2263 | error = -ENOMEM; | 2263 | error = -ENOMEM; |
| 2264 | mutex_unlock(&dir->d_inode->i_mutex); | ||
| 2264 | goto out; | 2265 | goto out; |
| 2265 | } | 2266 | } |
| 2266 | dentry = lookup_real(dir->d_inode, dentry, nd->flags); | 2267 | dentry = lookup_real(dir->d_inode, dentry, nd->flags); |
| 2267 | error = PTR_ERR(dentry); | 2268 | error = PTR_ERR(dentry); |
| 2268 | if (IS_ERR(dentry)) | 2269 | if (IS_ERR(dentry)) { |
| 2270 | mutex_unlock(&dir->d_inode->i_mutex); | ||
| 2269 | goto out; | 2271 | goto out; |
| 2272 | } | ||
| 2270 | } | 2273 | } |
| 2271 | mutex_unlock(&dir->d_inode->i_mutex); | 2274 | mutex_unlock(&dir->d_inode->i_mutex); |
| 2272 | 2275 | ||
