Return-Path: Received: from localhost (bix [127.0.0.1]) by localhost.localdomain (8.12.10/8.12.10) with ESMTP id j18GiZLL012142 for ; Tue, 8 Feb 2005 08:44:36 -0800 Received: from bix [127.0.0.1] by localhost with POP3 (fetchmail-6.2.0) for akpm@localhost (single-drop); Tue, 08 Feb 2005 08:44:36 -0800 (PST) Received: from smtp.osdl.org (fire.osdl.org [65.172.181.4]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id j18Gepl13903 for ; Tue, 8 Feb 2005 08:40:52 -0800 Received: from MTVMIME01.enterprise.veritas.com (bay-bridge.veritas.com [143.127.3.10]) by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id j18GemuM032513 for ; Tue, 8 Feb 2005 08:40:50 -0800 Received: from megami.veritas.com (unverified) by MTVMIME01.enterprise.veritas.com (Content Technologies SMTPRS 4.3.12) with SMTP id for ; Tue, 8 Feb 2005 08:40:41 -0800 Received: from goblin.wat.veritas.com ([10.10.97.50]) (1207 bytes) by megami.veritas.com via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Tue, 8 Feb 2005 08:40:40 -0800 (PST) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) Date: Tue, 8 Feb 2005 16:39:36 +0000 (GMT) From: Hugh Dickins X-X-Sender: hugh@goblin.wat.veritas.com To: Andrew Morton Subject: [PATCH -mm] /proc/swaps negative Used Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Received-SPF: none (domain of hugh@veritas.com does not designate permitted sender hosts) X-MIMEDefang-Filter: osdl$Revision: 1.101 $ X-Scanned-By: MIMEDefang 2.36 X-Spam-Status: No, score=-1.6 required=1.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on bix X-Spam-Level: Your swapspace-layout-improvements.patch inadvertently deletes a line too many, so /proc/swaps tends to show negative Used. I was tempted to delete "akpm", but compassion stayed my hand. Sorry, I'm sure you'd appreciate proper feedback on the patch, but I haven't studied it or noticed its impact yet. Signed-off-by: Hugh Dickins --- 2.6.11-rc3-mm1/mm/swapfile.c 2005-02-05 07:09:40.000000000 +0000 +++ linux/mm/swapfile.c 2005-02-08 16:29:30.000000000 +0000 @@ -119,6 +119,7 @@ scan_swap_map(struct swap_info_struct *s if (si->swap_map[block]) continue; si->swap_map[block] = 1; + si->inuse_pages++; nr_swap_pages--; if (akpm) printk("cookie:%p, index:%lu, chunk:%lu nchunks:%lu "