Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / fs / ufs / ialloc.c
index 767cb8f..c7a47ed 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/quotaops.h>
 #include <linux/buffer_head.h>
 #include <linux/sched.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/byteorder.h>
 
 #include "swab.h"
@@ -72,7 +72,7 @@ void ufs_free_inode (struct inode * inode)
 
        sb = inode->i_sb;
        uspi = UFS_SB(sb)->s_uspi;
-       usb1 = ubh_get_usb_first(USPI_UBH);
+       usb1 = ubh_get_usb_first(uspi);
        
        ino = inode->i_ino;
 
@@ -124,8 +124,7 @@ void ufs_free_inode (struct inode * inode)
        ubh_mark_buffer_dirty (USPI_UBH);
        ubh_mark_buffer_dirty (UCPI_UBH);
        if (sb->s_flags & MS_SYNCHRONOUS) {
-               ubh_wait_on_buffer (UCPI_UBH);
-               ubh_ll_rw_block (WRITE, 1, (struct ufs_buffer_head **) &ucpi);
+               ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **) &ucpi);
                ubh_wait_on_buffer (UCPI_UBH);
        }
        
@@ -168,7 +167,7 @@ struct inode * ufs_new_inode(struct inode * dir, int mode)
        ufsi = UFS_I(inode);
        sbi = UFS_SB(sb);
        uspi = sbi->s_uspi;
-       usb1 = ubh_get_usb_first(USPI_UBH);
+       usb1 = ubh_get_usb_first(uspi);
 
        lock_super (sb);
 
@@ -249,8 +248,7 @@ cg_found:
        ubh_mark_buffer_dirty (USPI_UBH);
        ubh_mark_buffer_dirty (UCPI_UBH);
        if (sb->s_flags & MS_SYNCHRONOUS) {
-               ubh_wait_on_buffer (UCPI_UBH);
-               ubh_ll_rw_block (WRITE, 1, (struct ufs_buffer_head **) &ucpi);
+               ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **) &ucpi);
                ubh_wait_on_buffer (UCPI_UBH);
        }
        sb->s_dirt = 1;
@@ -267,7 +265,7 @@ cg_found:
        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;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
        ufsi->i_flags = UFS_I(dir)->i_flags;
        ufsi->i_lastfrag = 0;
        ufsi->i_gen = 0;