]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/ufs/ialloc.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
[mv-sheeva.git] / fs / ufs / ialloc.c
index c684aaad99987d3fafadb5293cc76cd526ffb5fd..2ad1259c6ecaacd7f6130859c42cb8654fb0e991 100644 (file)
@@ -103,12 +103,12 @@ void ufs_free_inode (struct inode * inode)
                if (ino < ucpi->c_irotor)
                        ucpi->c_irotor = ino;
                fs32_add(sb, &ucg->cg_cs.cs_nifree, 1);
-               fs32_add(sb, &usb1->fs_cstotal.cs_nifree, 1);
+               uspi->cs_total.cs_nifree++;
                fs32_add(sb, &UFS_SB(sb)->fs_cs(cg).cs_nifree, 1);
 
                if (is_directory) {
                        fs32_sub(sb, &ucg->cg_cs.cs_ndir, 1);
-                       fs32_sub(sb, &usb1->fs_cstotal.cs_ndir, 1);
+                       uspi->cs_total.cs_ndir--;
                        fs32_sub(sb, &UFS_SB(sb)->fs_cs(cg).cs_ndir, 1);
                }
        }
@@ -116,7 +116,7 @@ void ufs_free_inode (struct inode * inode)
        ubh_mark_buffer_dirty (USPI_UBH(uspi));
        ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
        if (sb->s_flags & MS_SYNCHRONOUS) {
-               ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **) &ucpi);
+               ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
                ubh_wait_on_buffer (UCPI_UBH(ucpi));
        }
        
@@ -228,19 +228,19 @@ cg_found:
        }
        
        fs32_sub(sb, &ucg->cg_cs.cs_nifree, 1);
-       fs32_sub(sb, &usb1->fs_cstotal.cs_nifree, 1);
+       uspi->cs_total.cs_nifree--;
        fs32_sub(sb, &sbi->fs_cs(cg).cs_nifree, 1);
        
        if (S_ISDIR(mode)) {
                fs32_add(sb, &ucg->cg_cs.cs_ndir, 1);
-               fs32_add(sb, &usb1->fs_cstotal.cs_ndir, 1);
+               uspi->cs_total.cs_ndir++;
                fs32_add(sb, &sbi->fs_cs(cg).cs_ndir, 1);
        }
 
        ubh_mark_buffer_dirty (USPI_UBH(uspi));
        ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
        if (sb->s_flags & MS_SYNCHRONOUS) {
-               ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **) &ucpi);
+               ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
                ubh_wait_on_buffer (UCPI_UBH(ucpi));
        }
        sb->s_dirt = 1;
@@ -255,7 +255,6 @@ cg_found:
                inode->i_gid = current->fsgid;
 
        inode->i_ino = cg * uspi->s_ipg + bit;
-       inode->i_blksize = PAGE_SIZE;   /* This is the optimal IO size (for stat), not the fs block size */
        inode->i_blocks = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
        ufsi->i_flags = UFS_I(dir)->i_flags;