[<prev] [next>] [day] [month] [year] [list]
Message-Id: <259C2036-40DA-4441-9740-07C7AB4CFF54@dubeyko.com>
Date: Mon, 21 Sep 2020 09:21:23 -0700
From: Viacheslav Dubeyko <slava@...eyko.com>
To: Yi Wang <wang.yi59@....com.cn>
Cc: arnd@...db.de, ernesto.mnd.fernandez@...il.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
xue.zhihong@....com.cn, wang.liang82@....com.cn,
Liao Pingfang <liao.pingfang@....com.cn>
Subject: Re: [PATCH] hfsplus: Avoid truncating the logical block size
> On Sep 20, 2020, at 6:07 PM, Yi Wang <wang.yi59@....com.cn> wrote:
>
> From: Liao Pingfang <liao.pingfang@....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@....com.cn>
> Signed-off-by: Yi Wang <wang.yi59@....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@...eyko.com>
> --
> 1.8.3.1
Powered by blists - more mailing lists