Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1001691ybt; Wed, 17 Jun 2020 20:31:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvDoV0vh3tCjUuS3clEcHVghO7U0S0Ats5ZbTAQKQClq6D3/IpJ2NqNXIXrxb0oCd42q9s X-Received: by 2002:aa7:c2d3:: with SMTP id m19mr2096645edp.382.1592451110678; Wed, 17 Jun 2020 20:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592451110; cv=none; d=google.com; s=arc-20160816; b=u42dJ/J44m1iEbAK1hC4nGCxrqPwZqWnD5+qgz2XE8QSLFpqtu5XYXYfoY4KmMtpnG GFBVJ+71JQOd4is4TZOtkVKluQ4471HlnnRKAwE9Hrv/Y8cEepS6P8n6i5WVmxO1h1D7 AHX8ek1enNMATe5eoJilmp8+YInz4VgRWXZmkKHWmsAZp6IaZnhbtZYG6HvYiTjkoga9 cqsDjYSU5PUneoGO0fwauKEoLWQoy8f/AaZIHUGHyMfWWPGOfV3o1qYDQjUv5m48v9aN AecNHhaRjwi7+7G6zAX3yl3eRNKXzp6o3Ip5E9hnwIPwb2/jkMAIWnbuhN6VwtSt4BGC 1ZRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=vXdj56LrQPWABy1zW2yQAhKac/LJs/4giL07TcdD9rA=; b=KcXn64cAVRCL0xPTs1njjnUbzMX4uiUCFLYspCoGAj/w9vhGt8VCA94rqf1zePV/7z 60tvLiiQ4Wg3cFSGilZ2dqUkkXN31WZNxZCQyYj7HijcL2aE7a7FfSD+nauSkO2ridfs KJM/B1FAWFRe11Gzqz+p/WRLfyrooSCKaW8uTthi5tkhIDjdvmLRC+ETrSLV2Z42swro ngcPj1NHaV7zXFkhknd6C8XMrvCK5JanzEnaGYhkgCBxM+X+OFU368Lgg6q3k8JtenAA UzR1OVehlmt8DlS/Jjefo940eJ0bN9Ssg7Q8iIYM+cFIVcnALRmRnRWdoapQdAt9TxSI DT1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id uz8si1076749ejb.640.2020.06.17.20.31.28; Wed, 17 Jun 2020 20:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727058AbgFRD2g (ORCPT + 99 others); Wed, 17 Jun 2020 23:28:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:54342 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726893AbgFRD2f (ORCPT ); Wed, 17 Jun 2020 23:28:35 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 519763C700A116FC05BF; Thu, 18 Jun 2020 11:28:32 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.208) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 18 Jun 2020 11:28:22 +0800 Subject: Re: [PATCH v3] f2fs: use kfree() instead of kvfree() to free superblock data To: Jaegeuk Kim , Eric Biggers CC: Denis Efremov , , References: <20200605181533.73113-1-efremov@linux.com> <20200609221446.24537-1-efremov@linux.com> <20200609222546.GA24766@sol.localdomain> <20200615175800.GA117170@google.com> From: Chao Yu Message-ID: <033a4854-5ebd-4db4-c60f-f0f6826d70ea@huawei.com> Date: Thu, 18 Jun 2020 11:28:22 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200615175800.GA117170@google.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Chao Yu 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 > . >