[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230313101720.ogqufcqeqfxcdzfz@quack3>
Date: Mon, 13 Mar 2023 11:17:20 +0100
From: Jan Kara <jack@...e.cz>
To: Yangtao Li <frank.li@...o.com>
Cc: almaz.alexandrovich@...agon-software.com, jack@...e.com,
dushistov@...l.ru, brauner@...nel.org, ntfs3@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] udf: use wrapper i_blocksize() in
udf_discard_prealloc()
On Fri 10-03-23 11:08:20, Yangtao Li wrote:
> Convert to use i_blocksize() for readability.
>
> Signed-off-by: Yangtao Li <frank.li@...o.com>
Thanks. I've queued this cleanup into my tree.
Honza
> ---
> fs/udf/truncate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c
> index 871856c69df5..2e7ba234bab8 100644
> --- a/fs/udf/truncate.c
> +++ b/fs/udf/truncate.c
> @@ -127,7 +127,7 @@ void udf_discard_prealloc(struct inode *inode)
> uint64_t lbcount = 0;
> int8_t etype = -1;
> struct udf_inode_info *iinfo = UDF_I(inode);
> - int bsize = 1 << inode->i_blkbits;
> + int bsize = i_blocksize(inode);
>
> if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB ||
> ALIGN(inode->i_size, bsize) == ALIGN(iinfo->i_lenExtents, bsize))
> @@ -149,7 +149,7 @@ void udf_discard_prealloc(struct inode *inode)
> lbcount -= elen;
> udf_delete_aext(inode, prev_epos);
> udf_free_blocks(inode->i_sb, inode, &eloc, 0,
> - DIV_ROUND_UP(elen, 1 << inode->i_blkbits));
> + DIV_ROUND_UP(elen, bsize));
> }
> /* This inode entry is in-memory only and thus we don't have to mark
> * the inode dirty */
> --
> 2.25.1
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists