rpms/kernel/F-11 linux-2.6-mm-define-unique-value-for-as_unevictable.patch, NONE, 1.1 kernel.spec, 1.1536, 1.1537

Chuck Ebbert cebbert at fedoraproject.org
Tue Apr 14 12:07:52 UTC 2009


Author: cebbert

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

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-11/kernel.spec,v
retrieving revision 1.1536
retrieving revision 1.1537
diff -u -r1.1536 -r1.1537
--- kernel.spec	14 Apr 2009 11:32:18 -0000	1.1536
+++ kernel.spec	14 Apr 2009 12:07:20 -0000	1.1537
@@ -719,6 +719,9 @@
 # fix oops in md raid1 (#495550)
 Patch6000: linux-2.6-md-raid1-dont-assume-new-bvecs-are-init.patch
 
+# patches headed for -stable
+Patch7000: linux-2.6-mm-define-unique-value-for-as_unevictable.patch
+
 Patch9001: revert-fix-modules_install-via-nfs.patch
 
 Patch9002: cpufreq-add-atom-to-p4-clockmod.patch
@@ -1336,7 +1339,9 @@
 ApplyPatch linux-2.6-v4l-dvb-fix-uint16_t-audio-h.patch
 ApplyPatch linux-2.6-revert-dvb-net-kabi-change.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
 
 # revert 8b249b6856f16f09b0e5b79ce5f4d435e439b9d6
 ApplyPatch revert-fix-modules_install-via-nfs.patch
@@ -1933,6 +1938,9 @@
 
 %changelog
 * Tue Apr 14 2009 Chuck Ebbert <cebbert at redhat.com>
+- Fix duplicated flag value in pagemap.h (-stable patch)
+
+* Tue Apr 14 2009 Chuck Ebbert <cebbert at redhat.com>
 - acer-wmi: use upstream code to blacklist an additional model
 - Trivial fix to drm-modesetting-radeon to fix failure to apply
 




More information about the fedora-extras-commits mailing list