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 / ext2 / inode.c
index 2f0c404..c6a0128 100644 (file)
@@ -685,7 +685,7 @@ ext2_writepages(struct address_space *mapping, struct writeback_control *wbc)
        return mpage_writepages(mapping, wbc, ext2_get_block);
 }
 
-const struct address_space_operations ext2_aops = {
+struct address_space_operations ext2_aops = {
        .readpage               = ext2_readpage,
        .readpages              = ext2_readpages,
        .writepage              = ext2_writepage,
@@ -698,12 +698,12 @@ const struct address_space_operations ext2_aops = {
        .migratepage            = buffer_migrate_page,
 };
 
-const struct address_space_operations ext2_aops_xip = {
+struct address_space_operations ext2_aops_xip = {
        .bmap                   = ext2_bmap,
        .get_xip_page           = ext2_get_xip_page,
 };
 
-const struct address_space_operations ext2_nobh_aops = {
+struct address_space_operations ext2_nobh_aops = {
        .readpage               = ext2_readpage,
        .readpages              = ext2_readpages,
        .writepage              = ext2_nobh_writepage,
@@ -914,7 +914,7 @@ void ext2_truncate (struct inode * inode)
                return;
        if (ext2_inode_is_fast_symlink(inode))
                return;
-       if (IS_APPEND(inode) || IS_IXORUNLINK(inode))
+       if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
                return;
 
        ext2_discard_prealloc(inode);
@@ -1145,6 +1145,7 @@ void ext2_read_inode (struct inode * inode)
                brelse (bh);
                goto bad_inode;
        }
+       inode->i_blksize = PAGE_SIZE;   /* This is the optimal IO size (for stat), not the fs block size */
        inode->i_blocks = le32_to_cpu(raw_inode->i_blocks);
        ei->i_flags = le32_to_cpu(raw_inode->i_flags);
        ei->i_faddr = le32_to_cpu(raw_inode->i_faddr);