diff mbox series

[v4,5/5] fs/remap_range: convert to use i_blockmask()

Message ID 20230310054829.4241-5-frank.li@vivo.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/5] fs: add i_blockmask() | expand

Commit Message

Yangtao Li March 10, 2023, 5:48 a.m. UTC
Use i_blockmask() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/remap_range.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/remap_range.c b/fs/remap_range.c
index 1331a890f2f2..7a524b620e7d 100644
--- a/fs/remap_range.c
+++ b/fs/remap_range.c
@@ -127,7 +127,7 @@  static int generic_remap_check_len(struct inode *inode_in,
 				   loff_t *len,
 				   unsigned int remap_flags)
 {
-	u64 blkmask = i_blocksize(inode_in) - 1;
+	u64 blkmask = i_blockmask(inode_in);
 	loff_t new_len = *len;
 
 	if ((*len & blkmask) == 0)