]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Jan 2014 16:54:16 +0000 (08:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Jan 2014 16:54:16 +0000 (08:54 -0800)
Pull ext4 update from Ted Ts'o:
 "Bug fixes and cleanups for ext4.  We also enable the punch hole
  functionality for bigalloc file systems"

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: delete "set but not used" variables
  ext4: don't pass freed handle to ext4_walk_page_buffers
  ext4: avoid clearing beyond i_blocks when truncating an inline data file
  ext4: ext4_inode_is_fast_symlink should use EXT4_CLUSTER_SIZE
  ext4: fix a typo in extents.c
  ext4: use %pd printk specificer
  ext4: standardize error handling in ext4_da_write_inline_data_begin()
  ext4: retry allocation when inline->extent conversion failed
  ext4: enable punch hole for bigalloc

1  2 
fs/ext4/inode.c
fs/ext4/namei.c

diff --combined fs/ext4/inode.c
index fe4793e754d11b2963740751be9864d0b45fbd2e,f33b4eb82d80c6765ca694196bc72f92e261abfb..6e39895a91b80aaae3914cc3a51756b3fa48a4c8
@@@ -144,8 -144,8 +144,8 @@@ static int ext4_meta_trans_blocks(struc
   */
  static int ext4_inode_is_fast_symlink(struct inode *inode)
  {
-       int ea_blocks = EXT4_I(inode)->i_file_acl ?
-               (inode->i_sb->s_blocksize >> 9) : 0;
+         int ea_blocks = EXT4_I(inode)->i_file_acl ?
+               EXT4_CLUSTER_SIZE(inode->i_sb) >> 9 : 0;
  
        return (S_ISLNK(inode->i_mode) && inode->i_blocks - ea_blocks == 0);
  }
@@@ -1772,7 -1772,7 +1772,7 @@@ static int __ext4_journalled_writepage(
                ret = err;
  
        if (!ext4_has_inline_data(inode))
-               ext4_walk_page_buffers(handle, page_bufs, 0, len,
+               ext4_walk_page_buffers(NULL, page_bufs, 0, len,
                                       NULL, bput_one);
        ext4_set_inode_state(inode, EXT4_STATE_JDATA);
  out:
@@@ -3501,11 -3501,6 +3501,6 @@@ int ext4_punch_hole(struct inode *inode
        if (!S_ISREG(inode->i_mode))
                return -EOPNOTSUPP;
  
-       if (EXT4_SB(sb)->s_cluster_ratio > 1) {
-               /* TODO: Add support for bigalloc file systems */
-               return -EOPNOTSUPP;
-       }
        trace_ext4_punch_hole(inode, offset, length);
  
        /*
@@@ -4586,10 -4581,6 +4581,10 @@@ int ext4_setattr(struct dentry *dentry
                        if (attr->ia_size > sbi->s_bitmap_maxbytes)
                                return -EFBIG;
                }
 +
 +              if (IS_I_VERSION(inode) && attr->ia_size != inode->i_size)
 +                      inode_inc_iversion(inode);
 +
                if (S_ISREG(inode->i_mode) &&
                    (attr->ia_size < inode->i_size)) {
                        if (ext4_should_order_data(inode)) {
                ext4_orphan_del(NULL, inode);
  
        if (!rc && (ia_valid & ATTR_MODE))
 -              rc = ext4_acl_chmod(inode);
 +              rc = posix_acl_chmod(inode, inode->i_mode);
  
  err_out:
        ext4_std_error(inode->i_sb, error);
diff --combined fs/ext4/namei.c
index e77c1ba6c8af3043e010a2d6fd4588b9bce371c2,3e9e70663233b294f16147e4e646d11608d3e029..d050e043e884c19120c8062a2ab2991ba71a9a86
@@@ -1425,9 -1425,8 +1425,8 @@@ static struct dentry *ext4_lookup(struc
                        return ERR_PTR(-EIO);
                }
                if (unlikely(ino == dir->i_ino)) {
-                       EXT4_ERROR_INODE(dir, "'%.*s' linked to parent dir",
-                                        dentry->d_name.len,
-                                        dentry->d_name.name);
+                       EXT4_ERROR_INODE(dir, "'%pd' linked to parent dir",
+                                        dentry);
                        return ERR_PTR(-EIO);
                }
                inode = ext4_iget(dir->i_sb, ino);
@@@ -3225,7 -3224,6 +3224,7 @@@ const struct inode_operations ext4_dir_
        .listxattr      = ext4_listxattr,
        .removexattr    = generic_removexattr,
        .get_acl        = ext4_get_acl,
 +      .set_acl        = ext4_set_acl,
        .fiemap         = ext4_fiemap,
  };
  
@@@ -3236,5 -3234,4 +3235,5 @@@ const struct inode_operations ext4_spec
        .listxattr      = ext4_listxattr,
        .removexattr    = generic_removexattr,
        .get_acl        = ext4_get_acl,
 +      .set_acl        = ext4_set_acl,
  };