Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 21 Apr 2010 19:30:07 +0000 (12:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 21 Apr 2010 19:30:07 +0000 (12:30 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  jfs: add jfs specific ->setattr call
  jfs: fix diAllocExt error in resizing filesystem
  jfs_dmap.[ch]: trivial typo fix: s/heigth/height/g

1  2 
fs/jfs/inode.c
fs/jfs/jfs_dmap.c
fs/jfs/jfs_inode.h
fs/jfs/namei.c

diff --combined fs/jfs/inode.c
index 9dd126276c9f429c2be8990bca4af460d8d2a2af,97cd11954d083f61b37d285e593dc0a9be8c28aa..ed9ba6fe04f55839f94b21bc20f0c681aebae364
@@@ -22,7 -22,6 +22,7 @@@
  #include <linux/buffer_head.h>
  #include <linux/pagemap.h>
  #include <linux/quotaops.h>
 +#include <linux/writeback.h>
  #include "jfs_incore.h"
  #include "jfs_inode.h"
  #include "jfs_filsys.h"
@@@ -61,7 -60,7 +61,7 @@@ struct inode *jfs_iget(struct super_blo
                        inode->i_op = &page_symlink_inode_operations;
                        inode->i_mapping->a_ops = &jfs_aops;
                } else {
-                       inode->i_op = &jfs_symlink_inode_operations;
+                       inode->i_op = &jfs_fast_symlink_inode_operations;
                        /*
                         * The inline data should be null-terminated, but
                         * don't let on-disk corruption crash the kernel
@@@ -121,10 -120,8 +121,10 @@@ int jfs_commit_inode(struct inode *inod
        return rc;
  }
  
 -int jfs_write_inode(struct inode *inode, int wait)
 +int jfs_write_inode(struct inode *inode, struct writeback_control *wbc)
  {
 +      int wait = wbc->sync_mode == WB_SYNC_ALL;
 +
        if (test_cflag(COMMIT_Nolink, inode))
                return 0;
        /*
@@@ -149,9 -146,6 +149,9 @@@ void jfs_delete_inode(struct inode *ino
  {
        jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
  
 +      if (!is_bad_inode(inode))
 +              dquot_initialize(inode);
 +
        if (!is_bad_inode(inode) &&
            (JFS_IP(inode)->fileset == FILESYSTEM_I)) {
                truncate_inode_pages(&inode->i_data, 0);
                /*
                 * Free the inode from the quota allocation.
                 */
 -              vfs_dq_init(inode);
 -              vfs_dq_free_inode(inode);
 -              vfs_dq_drop(inode);
 +              dquot_initialize(inode);
 +              dquot_free_inode(inode);
 +              dquot_drop(inode);
        }
  
        clear_inode(inode);
diff --combined fs/jfs/jfs_dmap.c
index 6c4dfcbf3f5509bd7ea5ee85b89caf9eff44119d,7e19d2fe009813435b49b24965ab23fdcbb9f292..9e2f6a721668c067846d44d5bcfc9aa2d172e5ea
@@@ -17,7 -17,6 +17,7 @@@
   */
  
  #include <linux/fs.h>
 +#include <linux/slab.h>
  #include "jfs_incore.h"
  #include "jfs_superblock.h"
  #include "jfs_dmap.h"
@@@ -196,7 -195,7 +196,7 @@@ int dbMount(struct inode *ipbmap
        bmp->db_maxag = le32_to_cpu(dbmp_le->dn_maxag);
        bmp->db_agpref = le32_to_cpu(dbmp_le->dn_agpref);
        bmp->db_aglevel = le32_to_cpu(dbmp_le->dn_aglevel);
-       bmp->db_agheigth = le32_to_cpu(dbmp_le->dn_agheigth);
+       bmp->db_agheight = le32_to_cpu(dbmp_le->dn_agheight);
        bmp->db_agwidth = le32_to_cpu(dbmp_le->dn_agwidth);
        bmp->db_agstart = le32_to_cpu(dbmp_le->dn_agstart);
        bmp->db_agl2size = le32_to_cpu(dbmp_le->dn_agl2size);
@@@ -288,7 -287,7 +288,7 @@@ int dbSync(struct inode *ipbmap
        dbmp_le->dn_maxag = cpu_to_le32(bmp->db_maxag);
        dbmp_le->dn_agpref = cpu_to_le32(bmp->db_agpref);
        dbmp_le->dn_aglevel = cpu_to_le32(bmp->db_aglevel);
-       dbmp_le->dn_agheigth = cpu_to_le32(bmp->db_agheigth);
+       dbmp_le->dn_agheight = cpu_to_le32(bmp->db_agheight);
        dbmp_le->dn_agwidth = cpu_to_le32(bmp->db_agwidth);
        dbmp_le->dn_agstart = cpu_to_le32(bmp->db_agstart);
        dbmp_le->dn_agl2size = cpu_to_le32(bmp->db_agl2size);
@@@ -1441,7 -1440,7 +1441,7 @@@ dbAllocAG(struct bmap * bmp, int agno, 
         * tree index of this allocation group within the control page.
         */
        agperlev =
-           (1 << (L2LPERCTL - (bmp->db_agheigth << 1))) / bmp->db_agwidth;
+           (1 << (L2LPERCTL - (bmp->db_agheight << 1))) / bmp->db_agwidth;
        ti = bmp->db_agstart + bmp->db_agwidth * (agno & (agperlev - 1));
  
        /* dmap control page trees fan-out by 4 and a single allocation
                 * the subtree to find the leftmost leaf that describes this
                 * free space.
                 */
-               for (k = bmp->db_agheigth; k > 0; k--) {
+               for (k = bmp->db_agheight; k > 0; k--) {
                        for (n = 0, m = (ti << 2) + 1; n < 4; n++) {
                                if (l2nb <= dcp->stree[m + n]) {
                                        ti = m + n;
@@@ -3607,7 -3606,7 +3607,7 @@@ void dbFinalizeBmap(struct inode *ipbma
        }
  
        /*
-        * compute db_aglevel, db_agheigth, db_width, db_agstart:
+        * compute db_aglevel, db_agheight, db_width, db_agstart:
         * an ag is covered in aglevel dmapctl summary tree,
         * at agheight level height (from leaf) with agwidth number of nodes
         * each, which starts at agstart index node of the smmary tree node
        bmp->db_aglevel = BMAPSZTOLEV(bmp->db_agsize);
        l2nl =
            bmp->db_agl2size - (L2BPERDMAP + bmp->db_aglevel * L2LPERCTL);
-       bmp->db_agheigth = l2nl >> 1;
-       bmp->db_agwidth = 1 << (l2nl - (bmp->db_agheigth << 1));
-       for (i = 5 - bmp->db_agheigth, bmp->db_agstart = 0, n = 1; i > 0;
+       bmp->db_agheight = l2nl >> 1;
+       bmp->db_agwidth = 1 << (l2nl - (bmp->db_agheight << 1));
+       for (i = 5 - bmp->db_agheight, bmp->db_agstart = 0, n = 1; i > 0;
             i--) {
                bmp->db_agstart += n;
                n <<= 2;
diff --combined fs/jfs/jfs_inode.h
index 79e2c79661dfdf897ecac4832f55c91164c24a14,f8b56b238bb89ba23110709cc0bb0e9d5c51cd33..9e6bda30a6e86671abc5b878cecc6c7441c7376d
@@@ -26,7 -26,7 +26,7 @@@ extern long jfs_ioctl(struct file *, un
  extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long);
  extern struct inode *jfs_iget(struct super_block *, unsigned long);
  extern int jfs_commit_inode(struct inode *, int);
 -extern int jfs_write_inode(struct inode*, int);
 +extern int jfs_write_inode(struct inode *, struct writeback_control *);
  extern void jfs_delete_inode(struct inode *);
  extern void jfs_dirty_inode(struct inode *);
  extern void jfs_truncate(struct inode *);
@@@ -40,7 -40,6 +40,7 @@@ extern struct dentry *jfs_fh_to_parent(
        int fh_len, int fh_type);
  extern void jfs_set_inode_flags(struct inode *);
  extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
 +extern int jfs_setattr(struct dentry *, struct iattr *);
  
  extern const struct address_space_operations jfs_aops;
  extern const struct inode_operations jfs_dir_inode_operations;
@@@ -48,5 -47,6 +48,6 @@@ extern const struct file_operations jfs
  extern const struct inode_operations jfs_file_inode_operations;
  extern const struct file_operations jfs_file_operations;
  extern const struct inode_operations jfs_symlink_inode_operations;
+ extern const struct inode_operations jfs_fast_symlink_inode_operations;
  extern const struct dentry_operations jfs_ci_dentry_operations;
  #endif                                /* _H_JFS_INODE */
diff --combined fs/jfs/namei.c
index 4a3e9f39c21d05a430dba68a87e9a1fb0a73428b,114e6007110883ad258b618c4627bf0a449bd9fc..a9cf8e8675be8713dc5f9311faa20fefcac85156
@@@ -85,8 -85,6 +85,8 @@@ static int jfs_create(struct inode *dip
  
        jfs_info("jfs_create: dip:0x%p name:%s", dip, dentry->d_name.name);
  
 +      dquot_initialize(dip);
 +
        /*
         * search parent directory for entry/freespace
         * (dtSearch() returns parent directory page pinned)
@@@ -217,8 -215,6 +217,8 @@@ static int jfs_mkdir(struct inode *dip
  
        jfs_info("jfs_mkdir: dip:0x%p name:%s", dip, dentry->d_name.name);
  
 +      dquot_initialize(dip);
 +
        /* link count overflow on parent directory ? */
        if (dip->i_nlink == JFS_LINK_MAX) {
                rc = -EMLINK;
@@@ -360,8 -356,7 +360,8 @@@ static int jfs_rmdir(struct inode *dip
        jfs_info("jfs_rmdir: dip:0x%p name:%s", dip, dentry->d_name.name);
  
        /* Init inode for quota operations. */
 -      vfs_dq_init(ip);
 +      dquot_initialize(dip);
 +      dquot_initialize(ip);
  
        /* directory must be empty to be removed */
        if (!dtEmpty(ip)) {
@@@ -488,8 -483,7 +488,8 @@@ static int jfs_unlink(struct inode *dip
        jfs_info("jfs_unlink: dip:0x%p name:%s", dip, dentry->d_name.name);
  
        /* Init inode for quota operations. */
 -      vfs_dq_init(ip);
 +      dquot_initialize(dip);
 +      dquot_initialize(ip);
  
        if ((rc = get_UCSname(&dname, dentry)))
                goto out;
@@@ -811,8 -805,6 +811,8 @@@ static int jfs_link(struct dentry *old_
        if (ip->i_nlink == 0)
                return -ENOENT;
  
 +      dquot_initialize(dir);
 +
        tid = txBegin(ip->i_sb, 0);
  
        mutex_lock_nested(&JFS_IP(dir)->commit_mutex, COMMIT_MUTEX_PARENT);
@@@ -904,8 -896,6 +904,8 @@@ static int jfs_symlink(struct inode *di
  
        jfs_info("jfs_symlink: dip:0x%p name:%s", dip, name);
  
 +      dquot_initialize(dip);
 +
        ssize = strlen(name) + 1;
  
        /*
         */
  
        if (ssize <= IDATASIZE) {
-               ip->i_op = &jfs_symlink_inode_operations;
+               ip->i_op = &jfs_fast_symlink_inode_operations;
  
                i_fastsymlink = JFS_IP(ip)->i_inline;
                memcpy(i_fastsymlink, name, ssize);
        else {
                jfs_info("jfs_symlink: allocate extent ip:0x%p", ip);
  
-               ip->i_op = &page_symlink_inode_operations;
+               ip->i_op = &jfs_symlink_inode_operations;
                ip->i_mapping->a_ops = &jfs_aops;
  
                /*
@@@ -1097,9 -1087,6 +1097,9 @@@ static int jfs_rename(struct inode *old
        jfs_info("jfs_rename: %s %s", old_dentry->d_name.name,
                 new_dentry->d_name.name);
  
 +      dquot_initialize(old_dir);
 +      dquot_initialize(new_dir);
 +
        old_ip = old_dentry->d_inode;
        new_ip = new_dentry->d_inode;
  
        } else if (new_ip) {
                IWRITE_LOCK(new_ip, RDWRLOCK_NORMAL);
                /* Init inode for quota operations. */
 -              vfs_dq_init(new_ip);
 +              dquot_initialize(new_ip);
        }
  
        /*
@@@ -1373,8 -1360,6 +1373,8 @@@ static int jfs_mknod(struct inode *dir
  
        jfs_info("jfs_mknod: %s", dentry->d_name.name);
  
 +      dquot_initialize(dir);
 +
        if ((rc = get_UCSname(&dname, dentry)))
                goto out;
  
@@@ -1556,8 -1541,8 +1556,8 @@@ const struct inode_operations jfs_dir_i
        .getxattr       = jfs_getxattr,
        .listxattr      = jfs_listxattr,
        .removexattr    = jfs_removexattr,
 -#ifdef CONFIG_JFS_POSIX_ACL
        .setattr        = jfs_setattr,
 +#ifdef CONFIG_JFS_POSIX_ACL
        .check_acl      = jfs_check_acl,
  #endif
  };