[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <033a4854-5ebd-4db4-c60f-f0f6826d70ea@huawei.com>
Date: Thu, 18 Jun 2020 11:28:22 +0800
From: Chao Yu <yuchao0@...wei.com>
To: Jaegeuk Kim <jaegeuk@...nel.org>,
Eric Biggers <ebiggers@...nel.org>
CC: Denis Efremov <efremov@...ux.com>, <linux-kernel@...r.kernel.org>,
<linux-f2fs-devel@...ts.sourceforge.net>
Subject: Re: [PATCH v3] f2fs: use kfree() instead of kvfree() to free
superblock data
On 2020/6/16 1:58, Jaegeuk Kim wrote:
> On 06/09, Eric Biggers wrote:
>> On Wed, Jun 10, 2020 at 01:14:46AM +0300, Denis Efremov wrote:
>>> Use kfree() instead of kvfree() to free super in read_raw_super_block()
>>> because the memory is allocated with kzalloc() in the function.
>>> Use kfree() instead of kvfree() to free sbi, raw_super in
>>> f2fs_fill_super() and f2fs_put_super() because the memory is allocated
>>> with kzalloc().
>>>
>>> Fixes: 5222595d093e ("f2fs: use kvmalloc, if kmalloc is failed")
>>> Signed-off-by: Denis Efremov <efremov@...ux.com>
Reviewed-by: Chao Yu <yuchao0@...wei.com>
Thanks,
>>
>> I don't think "Fixes" is appropriate here.
>
> Agreed. I queued this Cl without it. :)
> Thanks,
>
>>
>> kvfree() still works on kmalloc'ed memory; it's just not preferred.
>>
>> So this is more a cleanup than a fix.
>>
>> - Eric
> .
>
Powered by blists - more mailing lists