]> Pileus Git - ~andy/linux/blobdiff - fs/btrfs/inode.c
Merge branch 'for-3.14/core' of git://git.kernel.dk/linux-block
[~andy/linux] / fs / btrfs / inode.c
index 7ab0e94ad49244e6167e2c758383c78c233f0cbb..d546d8c3038baa4451aa2f338a0c24592a3ea48f 100644 (file)
@@ -4354,8 +4354,12 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
         * these flags set.  For all other operations the VFS set these flags
         * explicitly if it wants a timestamp update.
         */
-       if (newsize != oldsize && (!(mask & (ATTR_CTIME | ATTR_MTIME))))
-               inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
+       if (newsize != oldsize) {
+               inode_inc_iversion(inode);
+               if (!(mask & (ATTR_CTIME | ATTR_MTIME)))
+                       inode->i_ctime = inode->i_mtime =
+                               current_fs_time(inode->i_sb);
+       }
 
        if (newsize > oldsize) {
                truncate_pagecache(inode, newsize);
@@ -4464,7 +4468,7 @@ static int btrfs_setattr(struct dentry *dentry, struct iattr *attr)
                err = btrfs_dirty_inode(inode);
 
                if (!err && attr->ia_valid & ATTR_MODE)
-                       err = btrfs_acl_chmod(inode);
+                       err = posix_acl_chmod(inode, inode->i_mode);
        }
 
        return err;
@@ -8648,12 +8652,14 @@ static const struct inode_operations btrfs_dir_inode_operations = {
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
        .get_acl        = btrfs_get_acl,
+       .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
 };
 static const struct inode_operations btrfs_dir_ro_inode_operations = {
        .lookup         = btrfs_lookup,
        .permission     = btrfs_permission,
        .get_acl        = btrfs_get_acl,
+       .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
 };
 
@@ -8723,6 +8729,7 @@ static const struct inode_operations btrfs_file_inode_operations = {
        .permission     = btrfs_permission,
        .fiemap         = btrfs_fiemap,
        .get_acl        = btrfs_get_acl,
+       .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
 };
 static const struct inode_operations btrfs_special_inode_operations = {
@@ -8734,6 +8741,7 @@ static const struct inode_operations btrfs_special_inode_operations = {
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
        .get_acl        = btrfs_get_acl,
+       .set_acl        = btrfs_set_acl,
        .update_time    = btrfs_update_time,
 };
 static const struct inode_operations btrfs_symlink_inode_operations = {
@@ -8747,7 +8755,6 @@ static const struct inode_operations btrfs_symlink_inode_operations = {
        .getxattr       = btrfs_getxattr,
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
-       .get_acl        = btrfs_get_acl,
        .update_time    = btrfs_update_time,
 };