Received: from mnm [127.0.0.1] by localhost with POP3 (fetchmail-5.9.0) for akpm@localhost (single-drop); Tue, 10 Jun 2003 10:03:54 -0700 (PDT) Received: from digeo-e2k04.digeo.com ([192.168.2.24]) by pao-ex01.pao.digeo.com with Microsoft SMTPSVC(5.0.2195.5329); Tue, 10 Jun 2003 10:00:22 -0700 Received: from digeo-nav01.digeo.com ([192.168.1.233]) by digeo-e2k04.digeo.com with Microsoft SMTPSVC(5.0.2195.5329); Tue, 10 Jun 2003 10:00:12 -0700 Received: from packet.digeo.com ([192.168.17.15]) by digeo-nav01.digeo.com (SAVSMTP 3.1.1.32) with SMTP id M2003061010022606983 for ; Tue, 10 Jun 2003 10:02:26 -0700 Received: from mtvmime01.veritas.com (bay-bridge.veritas.com [143.127.3.10]) by packet.digeo.com (8.12.8/8.12.8) with ESMTP id h5AH0AX8022745 for ; Tue, 10 Jun 2003 10:00:10 -0700 (PDT) Received: from megami (unverified) by mtvmime01.veritas.com (Content Technologies SMTPRS 4.2.10) with SMTP id ; Tue, 10 Jun 2003 10:03:20 -0700 Received: from luxury.wat.veritas.com([10.10.185.105]) (2820 bytes) by megami via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Tue, 10 Jun 2003 10:00:09 -0700 (PDT) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) Date: Tue, 10 Jun 2003 18:02:31 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@localhost.localdomain To: Andrew Morton cc: Christoph Rohland , Subject: [PATCH] tmpfs 3/3 little bits In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) Return-Path: hugh@veritas.com X-OriginalArrivalTime: 10 Jun 2003 17:00:12.0644 (UTC) FILETIME=[C1D77A40:01C32F71] X-Spam-Status: No, hits=-15.8 required=6.0 tests=BAYES_01,IN_REP_TO,PATCH_UNIFIED_DIFF,USER_AGENT_PINE autolearn=ham version=2.53 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) Remove shmem_nrpages, no use is made of it (even 2.4-ac, though it counts it, does nothing with it): reintroduce if it becomes useful. Replace GPL oneliner by the block from 2.4-ac, extend Copyright to 2003, remove two white spaces. --- tmpfs2/include/linux/shmem_fs.h Tue Dec 10 02:46:16 2002 +++ tmpfs3/include/linux/shmem_fs.h Fri Jun 6 16:10:09 2003 @@ -7,8 +7,6 @@ #define SHMEM_NR_DIRECT 16 -extern atomic_t shmem_nrpages; - struct shmem_inode_info { spinlock_t lock; unsigned long next_index; --- tmpfs2/mm/shmem.c Fri Jun 6 19:24:34 2003 +++ tmpfs3/mm/shmem.c Fri Jun 6 19:26:37 2003 @@ -6,8 +6,22 @@ * 2000-2001 Christoph Rohland * 2000-2001 SAP AG * 2002 Red Hat Inc. + * Copyright (C) 2002-2003 Hugh Dickins. + * Copyright (C) 2002-2003 VERITAS Software Corporation. * - * This file is released under the GPL. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* @@ -128,9 +142,8 @@ .memory_backed = 1, /* Does not contribute to dirty memory */ }; -LIST_HEAD (shmem_inodes); +LIST_HEAD(shmem_inodes); static spinlock_t shmem_ilock = SPIN_LOCK_UNLOCKED; -atomic_t shmem_nrpages = ATOMIC_INIT(0); /* Not used right now */ static void shmem_free_block(struct inode *inode) { @@ -965,7 +978,7 @@ size = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; if (pgoff >= size || pgoff + (len >> PAGE_SHIFT) > size) return -EINVAL; - + while ((long) len > 0) { struct page *page = NULL; int err;