[PATCH v3 6/6] fs/remap_range: convert to use i_blockmask()

Yangtao Li frank.li at vivo.com
Fri Mar 10 02:21:27 AEDT 2023


Use i_blockmask() to simplify code.

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

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)
-- 
2.25.1



More information about the Linux-erofs mailing list