diff options
Diffstat (limited to 'fs/f2fs/file.c')
-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 | } |