mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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: 0abd675e97 ("f2fs: support plain user/group quota")
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
committed by
Jaegeuk Kim
parent
73a2900701
commit
8e85002136
@@ -1523,7 +1523,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;
|
||||
}
|
||||
@@ -1534,9 +1533,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1549,7 +1547,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user