Skip to content

Commit 5ffff28

Browse files
Luis HenriquesJaegeuk Kim
authored andcommitted
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: 0abd675 ("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>
1 parent 5771a8c commit 5ffff28

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/f2fs/file.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
15381538

15391539
/* Is it quota file? Do not allow user to mess with it */
15401540
if (IS_NOQUOTA(inode)) {
1541-
inode_unlock(inode);
15421541
ret = -EPERM;
15431542
goto unlock_out;
15441543
}
@@ -1549,9 +1548,8 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
15491548

15501549
if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) {
15511550
if (!capable(CAP_LINUX_IMMUTABLE)) {
1552-
inode_unlock(inode);
15531551
ret = -EPERM;
1554-
goto out;
1552+
goto unlock_out;
15551553
}
15561554
}
15571555

@@ -1564,7 +1562,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
15641562
f2fs_mark_inode_dirty_sync(inode, false);
15651563
unlock_out:
15661564
inode_unlock(inode);
1567-
out:
15681565
mnt_drop_write_file(filp);
15691566
return ret;
15701567
}

0 commit comments

Comments
 (0)