* [PATCH] truncate: use i_blocksize() [not found] <0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com> @ 2017-01-20 14:29 ` Geliang Tang 2017-01-20 17:39 ` Ross Zwisler 0 siblings, 1 reply; 2+ messages in thread From: Geliang Tang @ 2017-01-20 14:29 UTC (permalink / raw) To: Andrew Morton, Johannes Weiner, Ross Zwisler, Jan Kara Cc: Geliang Tang, linux-mm, linux-kernel Since i_blocksize() helper has been defined in fs.h, use it instead of open-coding. Signed-off-by: Geliang Tang <geliangtang@gmail.com> --- 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] truncate: use i_blocksize() 2017-01-20 14:29 ` [PATCH] truncate: use i_blocksize() Geliang Tang @ 2017-01-20 17:39 ` Ross Zwisler 0 siblings, 0 replies; 2+ messages in thread From: Ross Zwisler @ 2017-01-20 17:39 UTC (permalink / raw) To: Geliang Tang Cc: Andrew Morton, Johannes Weiner, Ross Zwisler, Jan Kara, linux-mm, linux-kernel On Fri, Jan 20, 2017 at 10:29:54PM +0800, Geliang Tang wrote: > Since i_blocksize() helper has been defined in fs.h, use it instead > of open-coding. > > Signed-off-by: Geliang Tang <geliangtang@gmail.com> Sure this seems correct. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-20 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com>
2017-01-20 14:29 ` [PATCH] truncate: use i_blocksize() Geliang Tang
2017-01-20 17:39 ` Ross Zwisler
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox