Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp35640ybg; Tue, 9 Jun 2020 15:36:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBAfYq/63qslQ0FHsJpdUmshJFQnqZsaL2kR//fqOTjvMWnOmn9qmneI/VeGJAd8DhH7KB X-Received: by 2002:a17:906:1b1b:: with SMTP id o27mr528977ejg.264.1591742180919; Tue, 09 Jun 2020 15:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591742180; cv=none; d=google.com; s=arc-20160816; b=stmQKcJwBXLlAhkuNrfB3WNwuTrh//IcH9B3eUUv4WUA3hSTrYNLqFXUcZ9U6IK9yo yeZc47LNKZLkUjFAD0FoQXOZi69yiaUEVdxu5jsrCk52bFoxxadkm1uP/VXz3RnnMxnK ZbOvW74/u9OaYSULhv/Xr9YYRY92VEeZd8keEfKUo+QcYE/HMr4eUScaaVbz1pTyJ83A h4dahcJBBh/Y/PK00XlpUYRrb6ZV4skBDmz71YoE9m9sK08XoTKG6l6rej/jh+gM35t9 gmyxmIUxQUKTj1LNYsChC43BsxsRdsXmD6hY5AGSAekYa4wLZl8d13l2ag357BitXfka AyFQ== 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=eVSqZcFDrvuWqqH0JoEFm+NZ+Gi/zDN4ufFn+YTMaGA=; b=XRNPJYmL091HQYcDy8o+/qq5V0BOWEAj18meUU3OD6qVh6WE9ADRq/UncfbWXJImdk UY2HJkjuOBlGbvbvRvMn3zdIxyngUpwN5J7haIek7TTFNz+97IIiEzFtunZXeHcu0m/t fSEkaGBeP+lbEfy5bFhduNl03qwn2Kx+CSFiqM7lMuqIGGbHDxOcYVElSMJGTjLQ09KT QthorOjY+x5r3vF4Qesc26hTVGayxtlbOJXv25Hm7PbzJQZKe8mOo3lYC7k2ev27xApH hth/ro4Tdmu1wgna1H5ynAlDmufNLuR+axh4+51sr2IKsP+WRrXCZeYM5hXMRGopIwj0 FULQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YSnJYXuA; 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 n4si12699433edy.244.2020.06.09.15.35.57; Tue, 09 Jun 2020 15:36:20 -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=YSnJYXuA; 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 S1728459AbgFIWZt (ORCPT + 99 others); Tue, 9 Jun 2020 18:25:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:37326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728191AbgFIWZs (ORCPT ); Tue, 9 Jun 2020 18:25:48 -0400 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (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 C2A942076A; Tue, 9 Jun 2020 22:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591741548; bh=ZiGAAxqcuhhxs9PvbPCqFEGjRFXCgrcwJReQFO7XA/E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YSnJYXuAPyspiryhmezalX+GIx2SO/+uaN8GXwI1F2HabMRxXr0kjFyK6SOXCtjK9 wUUslCpX28JCbXSpwFWhWHKxElpHpvfGN0jX723t5Us5YaPPi7d1O05X8dNh0za+bg bL6MZVZY/YwT6XSFVsshHn3CYHyZ3dHYOaMH9Ayk= Date: Tue, 9 Jun 2020 15:25:46 -0700 From: Eric Biggers To: Denis Efremov Cc: Chao Yu , Jaegeuk Kim , 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: <20200609222546.GA24766@sol.localdomain> References: <20200605181533.73113-1-efremov@linux.com> <20200609221446.24537-1-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200609221446.24537-1-efremov@linux.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. kvfree() still works on kmalloc'ed memory; it's just not preferred. So this is more a cleanup than a fix. - Eric