From: =?ISO-8859-15?Q?Luk=E1=A8_Czerner?= Subject: Re: [PATCH 1/4] ext4: remove unsafe and unnecessary memset() Date: Fri, 30 Nov 2012 15:04:59 +0100 (CET) Message-ID: References: <1354257706-6582-1-git-send-email-yan@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1290881619-1354284309=:8688" Cc: Guo Chao , tytso@mit.edu, linux-ext4@vger.kernel.org To: =?ISO-8859-15?Q?Luk=E1=A8_Czerner?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18910 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755094Ab2K3OG6 (ORCPT ); Fri, 30 Nov 2012 09:06:58 -0500 In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1290881619-1354284309=:8688 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Fri, 30 Nov 2012, Luk?? Czerner wrote: > Date: Fri, 30 Nov 2012 14:20:42 +0100 (CET) > From: Luk?? Czerner > To: Guo Chao > Cc: tytso@mit.edu, linux-ext4@vger.kernel.org > Subject: Re: [PATCH 1/4] ext4: remove unsafe and unnecessary memset() > > On Fri, 30 Nov 2012, Guo Chao wrote: > > > Date: Fri, 30 Nov 2012 14:41:43 +0800 > > From: Guo Chao > > To: tytso@mit.edu > > Cc: linux-ext4@vger.kernel.org > > Subject: [PATCH 1/4] ext4: remove unsafe and unnecessary memset() > > > > We memset this page before checking whether it's valid. But we need > > not memset zeroed page at all. > > > > Signed-off-by: Guo Chao > > --- > > fs/ext4/super.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > > index ad6cd8a..66a4e20 100644 > > --- a/fs/ext4/super.c > > +++ b/fs/ext4/super.c > > @@ -3206,7 +3206,6 @@ int ext4_calculate_overhead(struct super_block *sb) > > ext4_fsblk_t overhead = 0; > > char *buf = (char *) get_zeroed_page(GFP_KERNEL); > > > > - memset(buf, 0, PAGE_SIZE); > > if (!buf) > > return -ENOMEM; > > Good catch, thanks! > > Reviewed-by: Lukas Czerner It looks like that it has been already fixed with a different patch. http://www.spinics.net/lists/linux-ext4/msg35310.html > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > --8323328-1290881619-1354284309=:8688--