X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fext2%2Finode.c;h=c6a012874ae80714d6b05509e1be339a51692b7b;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=2f0c404f04fa7d5473db0f0d14c13e41ea2028aa;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 2f0c404f0..c6a012874 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -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);