aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/acl.c2
-rw-r--r--fs/f2fs/checkpoint.c10
-rw-r--r--fs/f2fs/file.c5
-rw-r--r--fs/f2fs/sysfs.c1
4 files changed, 13 insertions, 5 deletions
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index a140c5e3dc54..b4b8438c42ef 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -211,7 +211,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
211 switch (type) { 211 switch (type) {
212 case ACL_TYPE_ACCESS: 212 case ACL_TYPE_ACCESS:
213 name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS; 213 name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
214 if (acl) { 214 if (acl && !ipage) {
215 error = posix_acl_update_mode(inode, &inode->i_mode, &acl); 215 error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
216 if (error) 216 if (error)
217 return error; 217 return error;
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 56bbf592e487..5b876f6d3f6b 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -879,6 +879,7 @@ int sync_dirty_inodes(struct f2fs_sb_info *sbi, enum inode_type type)
879 struct inode *inode; 879 struct inode *inode;
880 struct f2fs_inode_info *fi; 880 struct f2fs_inode_info *fi;
881 bool is_dir = (type == DIR_INODE); 881 bool is_dir = (type == DIR_INODE);
882 unsigned long ino = 0;
882 883
883 trace_f2fs_sync_dirty_inodes_enter(sbi->sb, is_dir, 884 trace_f2fs_sync_dirty_inodes_enter(sbi->sb, is_dir,
884 get_pages(sbi, is_dir ? 885 get_pages(sbi, is_dir ?
@@ -901,8 +902,17 @@ retry:
901 inode = igrab(&fi->vfs_inode); 902 inode = igrab(&fi->vfs_inode);
902 spin_unlock(&sbi->inode_lock[type]); 903 spin_unlock(&sbi->inode_lock[type]);
903 if (inode) { 904 if (inode) {
905 unsigned long cur_ino = inode->i_ino;
906
904 filemap_fdatawrite(inode->i_mapping); 907 filemap_fdatawrite(inode->i_mapping);
905 iput(inode); 908 iput(inode);
909 /* We need to give cpu to another writers. */
910 if (ino == cur_ino) {
911 congestion_wait(BLK_RW_ASYNC, HZ/50);
912 cond_resched();
913 } else {
914 ino = cur_ino;
915 }
906 } else { 916 } else {
907 /* 917 /*
908 * We should submit bio, since it exists several 918 * We should submit bio, since it exists several
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);
1565unlock_out: 1563unlock_out:
1566 inode_unlock(inode); 1564 inode_unlock(inode);
1567out:
1568 mnt_drop_write_file(filp); 1565 mnt_drop_write_file(filp);
1569 return ret; 1566 return ret;
1570} 1567}
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9adc202fcd6f..71191d89917d 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -11,6 +11,7 @@
11 */ 11 */
12#include <linux/proc_fs.h> 12#include <linux/proc_fs.h>
13#include <linux/f2fs_fs.h> 13#include <linux/f2fs_fs.h>
14#include <linux/seq_file.h>
14 15
15#include "f2fs.h" 16#include "f2fs.h"
16#include "segment.h" 17#include "segment.h"