diff options
author | Luis Henriques <lhenriques@suse.com> | 2017-07-11 12:30:33 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-07-16 00:10:23 -0400 |
commit | 5ffff2854a0b88fdd279fdb9cbf053d16c8fb2d6 (patch) | |
tree | 106fa94afe32c601df30c45aae9603e78ecfbb1d | |
parent | 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff) |
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.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index a0e6d2c65a9e..2706130c261b 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -1538,7 +1538,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) | |||
1538 | 1538 | ||
1539 | /* Is it quota file? Do not allow user to mess with it */ | 1539 | /* Is it quota file? Do not allow user to mess with it */ |
1540 | if (IS_NOQUOTA(inode)) { | 1540 | if (IS_NOQUOTA(inode)) { |
1541 | inode_unlock(inode); | ||
1542 | ret = -EPERM; | 1541 | ret = -EPERM; |
1543 | goto unlock_out; | 1542 | goto unlock_out; |
1544 | } | 1543 | } |
@@ -1549,9 +1548,8 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) | |||
1549 | 1548 | ||
1550 | if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) { | 1549 | if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) { |
1551 | if (!capable(CAP_LINUX_IMMUTABLE)) { | 1550 | if (!capable(CAP_LINUX_IMMUTABLE)) { |
1552 | inode_unlock(inode); | ||
1553 | ret = -EPERM; | 1551 | ret = -EPERM; |
1554 | goto out; | 1552 | goto unlock_out; |
1555 | } | 1553 | } |
1556 | } | 1554 | } |
1557 | 1555 | ||
@@ -1564,7 +1562,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) | |||
1564 | f2fs_mark_inode_dirty_sync(inode, false); | 1562 | f2fs_mark_inode_dirty_sync(inode, false); |
1565 | unlock_out: | 1563 | unlock_out: |
1566 | inode_unlock(inode); | 1564 | inode_unlock(inode); |
1567 | out: | ||
1568 | mnt_drop_write_file(filp); | 1565 | mnt_drop_write_file(filp); |
1569 | return ret; | 1566 | return ret; |
1570 | } | 1567 | } |