diff options
Diffstat (limited to 'fs/exfat/inode.c')
-rw-r--r-- | fs/exfat/inode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index 5b644cb057fa..481dd338f2b8 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -220,8 +220,7 @@ static int exfat_map_cluster(struct inode *inode, unsigned int clu_offset, num_clusters += num_to_be_allocated; *clu = new_clu.dir; - inode->i_blocks += - num_to_be_allocated << sbi->sect_per_clus_bits; + inode->i_blocks += EXFAT_CLU_TO_B(num_to_be_allocated, sbi) >> 9; /* * Move *clu pointer along FAT chains (hole care) because the @@ -576,8 +575,7 @@ static int exfat_fill_inode(struct inode *inode, struct exfat_dir_entry *info) exfat_save_attr(inode, info->attr); - inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >> - inode->i_blkbits; + inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >> 9; inode->i_mtime = info->mtime; inode->i_ctime = info->mtime; ei->i_crtime = info->crtime; |