Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 10 Apr 2002 21:44:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 10 Apr 2002 21:44:17 -0400 Received: from adsl-63-194-239-202.dsl.lsan03.pacbell.net ([63.194.239.202]:21243 "EHLO mmp-linux.matchmail.com") by vger.kernel.org with ESMTP id ; Wed, 10 Apr 2002 21:44:16 -0400 Date: Wed, 10 Apr 2002 18:46:30 -0700 From: Mike Fedyk To: "Randy.Dunlap" Cc: linux-kernel@vger.kernel.org Subject: Re: [patch-2.5.8-pre] swapinfo accounting Message-ID: <20020411014630.GK23513@matchmail.com> Mail-Followup-To: "Randy.Dunlap" , linux-kernel@vger.kernel.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2002 at 06:20:55PM -0700, Randy.Dunlap wrote: > Anyway, here is the patch that makes it better. > Not perfect, due to possibility of bad blocks, but better > than it was. Comments? > > > --- linux-258-pre2/mm/swapfile.c.SI Wed Apr 10 17:50:34 2002 > +++ linux-258-pre2/mm/swapfile.c Wed Apr 10 18:09:46 2002 > @@ -1107,8 +1107,8 @@ > } > } > } > - val->freeswap = nr_swap_pages + nr_to_be_unused; > - val->totalswap = total_swap_pages + nr_to_be_unused; > + val->freeswap = nr_swap_pages; > + val->totalswap = total_swap_pages; > swap_list_unlock(); > } Shouldn't that be s/+/-/ instead? If this is badblocks accounting, it should probably be subtracted instead of added. - 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/