public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Yue Hu <zbestahu@gmail.com>,
	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: Re: [PATCH] erofs: use wrapper i_blocksize() in erofs_file_read_iter()
Date: Mon, 6 Mar 2023 22:46:50 +0800	[thread overview]
Message-ID: <e5733d0f-d5bb-deb5-20ff-649a9823ffa1@linux.alibaba.com> (raw)
In-Reply-To: <20230306075527.1338-1-zbestahu@gmail.com>



On 2023/3/6 15:55, Yue Hu wrote:
> From: Yue Hu <huyue2@coolpad.com>
> 
> linux/fs.h has a wrapper for this operation.
> 
> Signed-off-by: Yue Hu <huyue2@coolpad.com>

Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>

Thanks,
Gao Xiang

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

  reply	other threads:[~2023-03-06 14:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06  7:55 [PATCH] erofs: use wrapper i_blocksize() in erofs_file_read_iter() Yue Hu
2023-03-06 14:46 ` Gao Xiang [this message]
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=e5733d0f-d5bb-deb5-20ff-649a9823ffa1@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.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=zbestahu@gmail.com \
    --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