FAT: small cleanup (3/4)
PATCH 1/1 FAT: small cleanup (3/4)
Hi,
just small cleanup.
Signature · 34 lines
OGAWA Hirofumi <[email protected]> fs/fat/file.c | 2 +- fs/fat/misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN fs/fat/misc.c~fat_micro-cleanup fs/fat/misc.c --- linux-2.6.6-rc3/fs/fat/misc.c~fat_micro-cleanup 2004-05-02 19:15:43.000000000 +0900 +++ linux-2.6.6-rc3-hirofumi/fs/fat/misc.c 2004-05-02 19:15:43.000000000 +0900 @@ -205,7 +205,7 @@ struct buffer_head *fat_extend_dir(struc if (inode->i_size & (sb->s_blocksize - 1)) { fat_fs_panic(sb, "Odd directory size"); inode->i_size = (inode->i_size + sb->s_blocksize) - & ~(sb->s_blocksize - 1); + & ~((loff_t)sb->s_blocksize - 1); } inode->i_size += MSDOS_SB(sb)->cluster_size; MSDOS_I(inode)->mmu_private += MSDOS_SB(sb)->cluster_size; diff -puN fs/fat/file.c~fat_micro-cleanup fs/fat/file.c --- linux-2.6.6-rc3/fs/fat/file.c~fat_micro-cleanup 2004-05-02 19:15:43.000000000 +0900 +++ linux-2.6.6-rc3-hirofumi/fs/fat/file.c 2004-05-02 19:15:43.000000000 +0900 @@ -50,7 +50,7 @@ int fat_get_block(struct inode *inode, s BUG(); return -EIO; } - if (!((unsigned long)iblock % MSDOS_SB(sb)->sec_per_clus)) { + if (!((unsigned long)iblock & (MSDOS_SB(sb)->sec_per_clus - 1))) { int error; error = fat_add_cluster(inode); _