2020-08-15 21:36:16

by Tianxianting

[permalink] [raw]
Subject: [PATCH] exfat: use i_blocksize() to get blocksize

We alreday has the interface i_blocksize() to get blocksize,
so use it.

Signed-off-by: Xianting Tian <[email protected]>
---
fs/exfat/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index a6a063830..163b599db 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -226,7 +226,7 @@ void exfat_truncate(struct inode *inode, loff_t size)
{
struct super_block *sb = inode->i_sb;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
- unsigned int blocksize = 1 << inode->i_blkbits;
+ unsigned int blocksize = i_blocksize(inode);
loff_t aligned_size;
int err;

--
2.17.1


2020-08-17 23:49:37

by Namjae Jeon

[permalink] [raw]
Subject: RE: [PATCH] exfat: use i_blocksize() to get blocksize

> We alreday has the interface i_blocksize() to get blocksize, so use it.
>
> Signed-off-by: Xianting Tian <[email protected]>
Pushed it into exfat #dev. Thanks for your patch!