aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2017-07-11 17:30:33 +0100
committerMoyster <oysterized@gmail.com>2017-07-21 12:38:25 +0200
commit14a14969f0b76cb676359137551259f322c508f4 (patch)
treea47822794bffafa3bdc4b91302c3554bda5e021e
parent1a576734b5ddfe89298c28757b71d0c9e9af135d (diff)
downloadandroid_kernel_m2note-14a14969f0b76cb676359137551259f322c508f4.tar.gz
f2fs: remove extra inode_unlock() in error path
This commit removes an extra inode_unlock() that is being done in function f2fs_ioc_setflags error path. While there, get rid of a useless 'out' label as well. Fixes: 0abd675e97e6 ("f2fs: support plain user/group quota") Signed-off-by: Luis Henriques <lhenriques@suse.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/file.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 15f45af8a..f5938858e 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1547,7 +1547,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
/* Is it quota file? Do not allow user to mess with it */
if (IS_NOQUOTA(inode)) {
- inode_unlock(inode);
ret = -EPERM;
goto unlock_out;
}
@@ -1558,9 +1557,8 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) {
if (!capable(CAP_LINUX_IMMUTABLE)) {
- inode_unlock(inode);
ret = -EPERM;
- goto out;
+ goto unlock_out;
}
}
@@ -1573,7 +1571,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
f2fs_mark_inode_dirty_sync(inode, false);
unlock_out:
inode_unlock(inode);
-out:
mnt_drop_write_file(filp);
return ret;
}