|
@@ -18,9 +18,14 @@
|
|
* Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page
|
|
* Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page
|
|
* allocation mode flags.
|
|
* 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)
|
|
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
|
|
#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)
|
|
static inline void mapping_set_unevictable(struct address_space *mapping)
|
|
{
|
|
{
|