Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Viacheslav Dubeyko <slava@dubeyko.com>
To: Yi Wang <wang.yi59@zte.com.cn>
Cc: arnd@arndb.de, ernesto.mnd.fernandez@gmail.com,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
xue.zhihong@zte.com.cn, wang.liang82@zte.com.cn,
Liao Pingfang <liao.pingfang@zte.com.cn>
Subject: Re: [PATCH] hfsplus: Avoid truncating the logical block size
Date: Mon, 21 Sep 2020 09:21:23 -0700 [thread overview]
Message-ID: <259C2036-40DA-4441-9740-07C7AB4CFF54@dubeyko.com> (raw)
In-Reply-To: <1600650462-41862-1-git-send-email-wang.yi59@zte.com.cn>
> On Sep 20, 2020, at 6:07 PM, Yi Wang <wang.yi59@zte.com.cn> wrote:
>
> From: Liao Pingfang <liao.pingfang@zte.com.cn>
>
> Return type of bdev_logical_blfsock_size() got changed from unsigned
> short to unsigned int, but it was forgotten to update hfsplus_min_io_size()
> to use the new type. Fix it by calling max_t with new type and returning
> new type as well.
>
> Fixes: ad6bf88a6c19 ("block: fix an integer overflow in logical block size")
> Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
> fs/hfsplus/hfsplus_fs.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
> index 3b03fff..3ed36d8 100644
> --- a/fs/hfsplus/hfsplus_fs.h
> +++ b/fs/hfsplus/hfsplus_fs.h
> @@ -302,9 +302,9 @@ struct hfsplus_readdir_data {
> /*
> * Find minimum acceptible I/O size for an hfsplus sb.
> */
> -static inline unsigned short hfsplus_min_io_size(struct super_block *sb)
> +static inline unsigned int hfsplus_min_io_size(struct super_block *sb)
> {
> - return max_t(unsigned short, bdev_logical_block_size(sb->s_bdev),
> + return max_t(unsigned int, bdev_logical_block_size(sb->s_bdev),
> HFSPLUS_SECTOR_SIZE);
> }
>
Looks good. Thanks.
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
> --
> 1.8.3.1
parent reply other threads:[~2020-09-21 16:21 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1600650462-41862-1-git-send-email-wang.yi59@zte.com.cn>]
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=259C2036-40DA-4441-9740-07C7AB4CFF54@dubeyko.com \
--to=slava@dubeyko.com \
--cc=arnd@arndb.de \
--cc=ernesto.mnd.fernandez@gmail.com \
--cc=liao.pingfang@zte.com.cn \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wang.liang82@zte.com.cn \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
--subject='Re: [PATCH] hfsplus: Avoid truncating the logical block size' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).