From: Yue Hu <zbestahu@gmail.com>
To: xiang@kernel.org, chao@kernel.org, jefflexu@linux.alibaba.com,
linux-erofs@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org, huyue2@coolpad.com, zhangwen@coolpad.com
Subject: [PATCH] erofs: use wrapper i_blocksize() in erofs_file_read_iter()
Date: Mon, 6 Mar 2023 15:55:27 +0800 [thread overview]
Message-ID: <20230306075527.1338-1-zbestahu@gmail.com> (raw)
From: Yue Hu <huyue2@coolpad.com>
linux/fs.h has a wrapper for this operation.
Signed-off-by: Yue Hu <huyue2@coolpad.com>
---
fs/erofs/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 5bd0c956a142..7e8baf56faa5 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -380,7 +380,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
if (bdev)
blksize_mask = bdev_logical_block_size(bdev) - 1;
else
- blksize_mask = (1 << inode->i_blkbits) - 1;
+ blksize_mask = i_blocksize(inode) - 1;
if ((iocb->ki_pos | iov_iter_count(to) |
iov_iter_alignment(to)) & blksize_mask)
--
2.17.1
next reply other threads:[~2023-03-06 7:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 7:55 Yue Hu [this message]
2023-03-06 14:46 ` Gao Xiang
2023-03-09 7:15 ` Yangtao Li
2023-03-09 7:36 ` Jingbo Xu
2023-03-09 7:42 ` Yangtao Li
2023-03-09 8:09 ` Gao Xiang
2023-03-09 7:37 ` Yue Hu
2023-03-09 8:07 ` Gao Xiang
2023-03-09 14:33 ` [PATCH] " Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230306075527.1338-1-zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=chao@kernel.org \
--cc=huyue2@coolpad.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiang@kernel.org \
--cc=zhangwen@coolpad.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®