|
@@ -25,6 +25,8 @@ enum mapping_flags {
|
|
AS_MM_ALL_LOCKS = __GFP_BITS_SHIFT + 2, /* under mm_take_all_locks() */
|
|
AS_MM_ALL_LOCKS = __GFP_BITS_SHIFT + 2, /* under mm_take_all_locks() */
|
|
AS_UNEVICTABLE = __GFP_BITS_SHIFT + 3, /* e.g., ramdisk, SHM_LOCK */
|
|
AS_UNEVICTABLE = __GFP_BITS_SHIFT + 3, /* e.g., ramdisk, SHM_LOCK */
|
|
AS_EXITING = __GFP_BITS_SHIFT + 4, /* final truncate in progress */
|
|
AS_EXITING = __GFP_BITS_SHIFT + 4, /* final truncate in progress */
|
|
|
|
+ /* writeback related tags are not used */
|
|
|
|
+ AS_NO_WRITEBACK_TAGS = __GFP_BITS_SHIFT + 5,
|
|
};
|
|
};
|
|
|
|
|
|
static inline void mapping_set_error(struct address_space *mapping, int error)
|
|
static inline void mapping_set_error(struct address_space *mapping, int error)
|
|
@@ -64,6 +66,16 @@ static inline int mapping_exiting(struct address_space *mapping)
|
|
return test_bit(AS_EXITING, &mapping->flags);
|
|
return test_bit(AS_EXITING, &mapping->flags);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline void mapping_set_no_writeback_tags(struct address_space *mapping)
|
|
|
|
+{
|
|
|
|
+ set_bit(AS_NO_WRITEBACK_TAGS, &mapping->flags);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static inline int mapping_use_writeback_tags(struct address_space *mapping)
|
|
|
|
+{
|
|
|
|
+ return !test_bit(AS_NO_WRITEBACK_TAGS, &mapping->flags);
|
|
|
|
+}
|
|
|
|
+
|
|
static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
|
|
static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
|
|
{
|
|
{
|
|
return (__force gfp_t)mapping->flags & __GFP_BITS_MASK;
|
|
return (__force gfp_t)mapping->flags & __GFP_BITS_MASK;
|