Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751739AbbKIUlJ (ORCPT ); Mon, 9 Nov 2015 15:41:09 -0500 Received: from mga03.intel.com ([134.134.136.65]:41633 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746AbbKIUlG convert rfc822-to-8bit (ORCPT ); Mon, 9 Nov 2015 15:41:06 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,267,1444719600"; d="scan'208";a="681656604" From: "Dilger, Andreas" To: Tetsuo Handa , "akpm@linux-foundation.org" , "linux-mm@kvack.org" CC: Russell King , "linux-acpi@vger.kernel.org" , "drbd-user@lists.linbit.com" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Drokin, Oleg" , "codalist@coda.cs.cmu.edu" , "linux-mtd@lists.infradead.org" , Jan Kara , "linux-fsdevel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree() Thread-Topic: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree() Thread-Index: AQHRGuXl4y2oGRrfdk++zmLE7Lk+Pp6UOaIA Date: Mon, 9 Nov 2015 20:41:04 +0000 Message-ID: References: <1447070170-8512-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> In-Reply-To: <1447070170-8512-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.90.58] Content-Type: text/plain; charset="us-ascii" Content-ID: <994BD6192472F340B6785C8E6A9E1FA4@intel.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 957 Lines: 34 On 2015/11/09, 04:56, "Tetsuo Handa" wrote: >There are many locations that do > > if (memory_was_allocated_by_vmalloc) > vfree(ptr); > else > kfree(ptr); > >but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory >using is_vmalloc_addr(). Unless callers have special reasons, we can >replace this branch with kvfree(). Please check and reply if you found >problems. > >Signed-off-by: Tetsuo Handa >Acked-by: Michal Hocko For Lustre part: Reviewed-by: Andreas Dilger Cheers, Andreas -- Andreas Dilger Lustre Principal Engineer Intel High Performance Data Division -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/