From: Zhang Yi <yi.zhang@huaweicloud.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
tytso@mit.edu, adilger.kernel@dilger.ca
Subject: Re: [PATCH 4/6] ext4: remove unneeded check in get_dx_countlimit
Date: Sat, 21 Dec 2024 15:44:31 +0800 [thread overview]
Message-ID: <a002a2bd-f8ff-4bf2-bb4d-e686cfeea6ac@huaweicloud.com> (raw)
In-Reply-To: <20241219110027.1440876-5-shikemeng@huaweicloud.com>
On 2024/12/19 19:00, Kemeng Shi wrote:
> The "offset" is always non-NULL, remove unneeded NULL check of "offset".
>
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
I agree with Ojaswin, the check strengthens the function, and I'd
suggest that we'd better to keep it for now.
Thanks,
Yi.
> ---
> fs/ext4/namei.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index 33670cebdedc..07a1bb570deb 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -434,8 +434,7 @@ static struct dx_countlimit *get_dx_countlimit(struct inode *inode,
> } else
> return NULL;
>
> - if (offset)
> - *offset = count_offset;
> + *offset = count_offset;
> return (struct dx_countlimit *)(((void *)dirent) + count_offset);
> }
>
next prev parent reply other threads:[~2024-12-21 7:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 11:00 [PATCH 0/6] Fix and cleanups to ext4 namei.c Kemeng Shi
2024-12-19 11:00 ` [PATCH 1/6] ext4: add missing brelse for bh2 in ext4_dx_add_entry Kemeng Shi
2024-12-20 12:57 ` Ojaswin Mujoo
2024-12-20 13:15 ` Markus Elfring
2024-12-24 12:11 ` Kemeng Shi
2024-12-21 7:33 ` Zhang Yi
2024-12-19 11:00 ` [PATCH 2/6] ext4: remove unneeded bits mask in dx_get_block() Kemeng Shi
2024-12-20 1:10 ` Andreas Dilger
2024-12-24 12:09 ` Kemeng Shi
2024-12-19 11:00 ` [PATCH 3/6] ext4: remove unneeded forward declaration in namei.c Kemeng Shi
2024-12-20 12:55 ` Ojaswin Mujoo
2024-12-21 7:34 ` Zhang Yi
2024-12-19 11:00 ` [PATCH 4/6] ext4: remove unneeded check in get_dx_countlimit Kemeng Shi
2024-12-20 12:51 ` Ojaswin Mujoo
2024-12-24 12:10 ` Kemeng Shi
2024-12-21 7:44 ` Zhang Yi [this message]
2024-12-24 12:16 ` Kemeng Shi
2024-12-19 11:00 ` [PATCH 5/6] ext4: remove unused input "inode" in ext4_find_dest_de Kemeng Shi
2024-12-21 7:45 ` Zhang Yi
2024-12-19 11:00 ` [PATCH 6/6] ext4: calculate rec_len of ".." with correct name length 2 Kemeng Shi
2024-12-20 13:52 ` Markus Elfring
2024-12-20 20:38 ` Andreas Dilger
2024-12-24 12:15 ` Kemeng Shi
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=a002a2bd-f8ff-4bf2-bb4d-e686cfeea6ac@huaweicloud.com \
--to=yi.zhang@huaweicloud.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shikemeng@huaweicloud.com \
--cc=tytso@mit.edu \
/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®