]> Pileus Git - ~andy/linux/blobdiff - fs/f2fs/file.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[~andy/linux] / fs / f2fs / file.c
index c77ad4d8b564fe412c2e38fe2f9f9f122bd71eec..0dfcef53a6ed830e442f8c174ea166b0d1b2eabd 100644 (file)
@@ -115,7 +115,7 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
        int ret = 0;
        bool need_cp = false;
        struct writeback_control wbc = {
-               .sync_mode = WB_SYNC_ALL,
+               .sync_mode = WB_SYNC_NONE,
                .nr_to_write = LONG_MAX,
                .for_reclaim = 0,
        };
@@ -202,7 +202,7 @@ int truncate_data_blocks_range(struct dnode_of_data *dn, int count)
        raw_node = F2FS_NODE(dn->node_page);
        addr = blkaddr_in_node(raw_node) + ofs;
 
-       for ( ; count > 0; count--, addr++, dn->ofs_in_node++) {
+       for (; count > 0; count--, addr++, dn->ofs_in_node++) {
                block_t blkaddr = le32_to_cpu(*addr);
                if (blkaddr == NULL_ADDR)
                        continue;
@@ -382,7 +382,7 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
        __setattr_copy(inode, attr);
 
        if (attr->ia_valid & ATTR_MODE) {
-               err = f2fs_acl_chmod(inode);
+               err = posix_acl_chmod(inode, get_inode_mode(inode));
                if (err || is_inode_flag_set(fi, FI_ACL_MODE)) {
                        inode->i_mode = fi->i_acl_mode;
                        clear_inode_flag(fi, FI_ACL_MODE);
@@ -397,6 +397,7 @@ const struct inode_operations f2fs_file_inode_operations = {
        .getattr        = f2fs_getattr,
        .setattr        = f2fs_setattr,
        .get_acl        = f2fs_get_acl,
+       .set_acl        = f2fs_set_acl,
 #ifdef CONFIG_F2FS_FS_XATTR
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,