@@ -32,6 +32,8 @@
#ifndef LLITE_INTERNAL_H
#define LLITE_INTERNAL_H
+
+#include <linux/pagemap.h>
#include <obd.h>
#include <uapi/linux/lustre/lustre_ver.h>
#include <lustre_disk.h> /* for s2sbi */
@@ -1110,6 +1112,11 @@ void ll_cl_add(struct file *file, const struct lu_env *env, struct cl_io *io,
void ll_cl_remove(struct file *file, const struct lu_env *env);
struct ll_cl_context *ll_cl_find(struct file *file);
+static inline void mapping_clear_exiting(struct address_space *mapping)
+{
+ clear_bit(AS_EXITING, &mapping->flags);
+}
+
extern const struct address_space_operations ll_aops;
/* llite/file.c */
@@ -164,7 +164,7 @@ static int vvp_prune(const struct lu_env *env, struct cl_object *obj)
}
ll_truncate_inode_pages_final(inode);
- clear_bit(AS_EXITING, &inode->i_mapping->flags);
+ mapping_clear_exiting(inode->i_mapping);
return 0;
}