[PATCH] truncate: use i_blocksize()
From: Geliang Tang
Date: Fri Jan 20 2017 - 09:30:50 EST
Since i_blocksize() helper has been defined in fs.h, use it instead
of open-coding.
Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
---
mm/truncate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/truncate.c b/mm/truncate.c
index dd7b24e..4c49a9b 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -785,7 +785,7 @@ EXPORT_SYMBOL(truncate_setsize);
*/
void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)
{
- int bsize = 1 << inode->i_blkbits;
+ int bsize = i_blocksize(inode);
loff_t rounded_from;
struct page *page;
pgoff_t index;
--
2.9.3