Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1849943ybt; Mon, 15 Jun 2020 11:00:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv2GUQqKAw4lxFgKYRy4tQZwVPYQwG0cqT6yCiYD3hmaHsI4FF6XrBz9Lkn1DIUH2kpnRQ X-Received: by 2002:a17:906:c150:: with SMTP id dp16mr26148630ejc.536.1592244037266; Mon, 15 Jun 2020 11:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592244037; cv=none; d=google.com; s=arc-20160816; b=g6Zy/o7kHM/ka6UsZNGBVt4IQWNFlebTLlL4XkFeneseccS+SHKrpzK1Mhk/tyyCFM EETJfcwUkOT2jUGQtyuWXnwDYYVrzH4uI//9Ac9qpmbEsYlH6/gWTrX3h9qe8thZhiyB V2SgtvnQtPubjeOLqIdbTMQqAvqq3sZeXP2XZ/zEVNUQAKJeZasBIrGILjefLWcH7Pum tqN7NQzoiaqDJ4vqgTfrfpBxT5M52vukoAjkCTYtGE78U5bvVIoM56LxwZTnO7ckV3hQ 1c/2G+jQeaNEdmEy6fCA4t8pUc18FdfKT70GQgwmMYmEk2JnRr7ggUIx33AJyRWS8Xhb LK3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/DVT1KKJsuUqFvkFf47xqYBDJ8or9vALjKMTx11OR0Q=; b=aClTJaaRdF1yTLsySgcBAIfJ6K6X9kkNf54aWm0iMr4X5432a2V8Fputl+hASwPvzz QZye4L7evK9/SrYdMqtYZmLeksQRhNbpz7zHDr8pHMpQiF2A4m0KFRNPEQj/ThJp66p6 mVbfCwsevzBeYSYP9tpr182N7JAmd1ng2PQB30geaRL053IqaDlm69OMP3L8UcBEd07l L0yDNhAS81GfJv5S1vJHpym7Uthw9bOzcAx0JKbZvnGyYPpwH5EDCCLBwtqdcL5zkTSC /Gd6ZxO1Anr0CNEmw4yhELODdURXoPkHpj3vC0+knmtQVTMrrhcOVVRpj0WdpCfkNt7r 5j2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vBF2Zxx9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si8687870edr.56.2020.06.15.11.00.14; Mon, 15 Jun 2020 11:00:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b=vBF2Zxx9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729806AbgFOR6C (ORCPT + 99 others); Mon, 15 Jun 2020 13:58:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:58774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728585AbgFOR6B (ORCPT ); Mon, 15 Jun 2020 13:58:01 -0400 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 70F16206F1; Mon, 15 Jun 2020 17:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592243881; bh=sNn6POHHZDQ9IACdImpskz4O92eeG7vzTpa1ghfyuIA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vBF2Zxx90O2zggkzdqrAvirH4V7LShHUF+GDy3ptW5L7oxSbyT8KVN/EdksTccAvq uehEHRNxZHyTfjZ9B8RFvonWNW/QM+E0eGz2XLZ8mOvann9+NoXAHxcX/HlQLvQocE 7gstnuq2N80VfOQLZgPpIUx6uS69D+ihemIeoGcI= Date: Mon, 15 Jun 2020 10:58:00 -0700 From: Jaegeuk Kim To: Eric Biggers Cc: Denis Efremov , Chao Yu , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH v3] f2fs: use kfree() instead of kvfree() to free superblock data Message-ID: <20200615175800.GA117170@google.com> References: <20200605181533.73113-1-efremov@linux.com> <20200609221446.24537-1-efremov@linux.com> <20200609222546.GA24766@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200609222546.GA24766@sol.localdomain> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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