rpms/kernel/F-10 linux-2.6-mm-define-unique-value-for-as_unevictable.patch, NONE, 1.1 kernel.spec, 1.1325, 1.1326

Chuck Ebbert cebbert at fedoraproject.org
Tue Apr 14 12:22:08 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12067

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-mm-define-unique-value-for-as_unevictable.patch 
Log Message:
Fix duplicated flag value in pagemap.h (-stable patch)

linux-2.6-mm-define-unique-value-for-as_unevictable.patch:

--- NEW FILE linux-2.6-mm-define-unique-value-for-as_unevictable.patch ---
From: Lee Schermerhorn <Lee.Schermerhorn at hp.com>
Date: Thu, 2 Apr 2009 23:56:45 +0000 (-0700)
Subject: mm: define a UNIQUE value for AS_UNEVICTABLE flag
X-Git-Tag: v2.6.30-rc1~398
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9a896c9a48ac6704c0ce8ee081b836644d0afe40

mm: define a UNIQUE value for AS_UNEVICTABLE flag

A new "address_space flag"--AS_MM_ALL_LOCKS--was defined to use the next
available AS flag while the Unevictable LRU was under development.  The
Unevictable LRU was using the same flag and "no one" noticed.  Current
mainline, since 2.6.28, has same value for two symbolic flag names.

So, define a unique flag value for AS_UNEVICTABLE--up close to the other
flags, [at the cost of an additional #ifdef] so we'll notice next time.
Note that #ifdef is not actually required, if we don't mind having the
unused flag value defined.

Replace #defines with an enum.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn at hp.com>
Cc: <stable at kernel.org>		[2.6.28.x, 2.6.29.x]
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 01ca085..076a7dc 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -18,9 +18,14 @@
  * Bits in mapping->flags.  The lower __GFP_BITS_SHIFT bits are the page
  * allocation mode flags.
  */
-#define	AS_EIO		(__GFP_BITS_SHIFT + 0)	/* IO error on async write */
-#define AS_ENOSPC	(__GFP_BITS_SHIFT + 1)	/* ENOSPC on async write */
-#define AS_MM_ALL_LOCKS	(__GFP_BITS_SHIFT + 2)	/* under mm_take_all_locks() */
+enum mapping_flags {
+	AS_EIO		= __GFP_BITS_SHIFT + 0,	/* IO error on async write */
+	AS_ENOSPC	= __GFP_BITS_SHIFT + 1,	/* ENOSPC on async write */
+	AS_MM_ALL_LOCKS	= __GFP_BITS_SHIFT + 2,	/* under mm_take_all_locks() */
+#ifdef CONFIG_UNEVICTABLE_LRU
+	AS_UNEVICTABLE	= __GFP_BITS_SHIFT + 3,	/* e.g., ramdisk, SHM_LOCK */
+#endif
+};
 
 static inline void mapping_set_error(struct address_space *mapping, int error)
 {
@@ -33,7 +38,6 @@ static inline void mapping_set_error(struct address_space *mapping, int error)
 }
 
 #ifdef CONFIG_UNEVICTABLE_LRU
-#define AS_UNEVICTABLE	(__GFP_BITS_SHIFT + 2)	/* e.g., ramdisk, SHM_LOCK */
 
 static inline void mapping_set_unevictable(struct address_space *mapping)
 {


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1325
retrieving revision 1.1326
diff -u -r1.1325 -r1.1326
--- kernel.spec	14 Apr 2009 11:40:05 -0000	1.1325
+++ kernel.spec	14 Apr 2009 12:21:37 -0000	1.1326
@@ -692,8 +692,10 @@
 
 Patch3000: linux-2.6-btrfs-experimental-branch.patch
 
+# patches headed for -stable
 # fix oops in md raid1 (#495550)
 Patch6000: linux-2.6-md-raid1-dont-assume-new-bvecs-are-init.patch
+Patch7000: linux-2.6-mm-define-unique-value-for-as_unevictable.patch
 
 Patch9000: squashfs3.patch
 Patch9001: squashfs-fixups.patch
@@ -1283,7 +1285,9 @@
 # silence the ACPI blacklist code
 ApplyPatch linux-2.6-silence-acpi-blacklist.patch
 
+# patches headed for -stable
 ApplyPatch linux-2.6-md-raid1-dont-assume-new-bvecs-are-init.patch
+ApplyPatch linux-2.6-mm-define-unique-value-for-as_unevictable.patch
 
 # we need squashfs3 for Fedora-10
 ApplyPatch squashfs3.patch
@@ -1874,6 +1878,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Tue Apr 14 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.1-25
+- Fix duplicated flag value in pagemap.h (-stable patch)
+
 * Tue Apr 14 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29.1-24
 - Blacklist acer-wmi on the AAO to fix rfkill switch problems
 




More information about the fedora-extras-commits mailing list