[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <42f841c7-ce17-42a6-4393-25fba58b2575@huaweicloud.com>
Date: Tue, 24 Dec 2024 20:16:24 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: Zhang Yi <yi.zhang@...weicloud.com>
Cc: linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org, tytso@....edu,
adilger.kernel@...ger.ca
Subject: Re: [PATCH 4/6] ext4: remove unneeded check in get_dx_countlimit
on 12/21/2024 3:44 PM, Zhang Yi wrote:
> 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@...weicloud.com>
>
> I agree with Ojaswin, the check strengthens the function, and I'd
> suggest that we'd better to keep it for now.
Sure, will drop this in next version.
Thanks,
Kemeng
>
> 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);
>> }
>>
>
Powered by blists - more mailing lists