[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230310030821.66090-1-frank.li@vivo.com>
Date: Fri, 10 Mar 2023 11:08:19 +0800
From: Yangtao Li <frank.li@...o.com>
To: almaz.alexandrovich@...agon-software.com, jack@...e.com,
dushistov@...l.ru, brauner@...nel.org, ntfs3@...ts.linux.dev
Cc: linux-kernel@...r.kernel.org, Yangtao Li <frank.li@...o.com>
Subject: [PATCH 1/3] fs/ntfs3: use wrapper i_blocksize() in ntfs_zero_range()
Convert to use i_blocksize() for readability.
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
fs/ntfs3/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index e9bdc1ff08c9..9d6ff29de441 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -178,7 +178,7 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
{
int err = 0;
struct address_space *mapping = inode->i_mapping;
- u32 blocksize = 1 << inode->i_blkbits;
+ u32 blocksize = i_blocksize(inode);
pgoff_t idx = vbo >> PAGE_SHIFT;
u32 from = vbo & (PAGE_SIZE - 1);
pgoff_t idx_end = (vbo_to + PAGE_SIZE - 1) >> PAGE_SHIFT;
@@ -192,7 +192,7 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
page_off = (loff_t)idx << PAGE_SHIFT;
to = (page_off + PAGE_SIZE) > vbo_to ? (vbo_to - page_off)
: PAGE_SIZE;
- iblock = page_off >> inode->i_blkbits;
+ iblock = page_off / i_blocksize(inode);
page = find_or_create_page(mapping, idx,
mapping_gfp_constraint(mapping,
--
2.25.1
Powered by blists - more mailing lists