CFS_LIST_HEAD(ll_super_blocks);
cfs_spinlock_t ll_sb_lock = CFS_SPIN_LOCK_UNLOCKED;
+#ifndef MS_HAS_NEW_AOPS
extern struct address_space_operations ll_aops;
extern struct address_space_operations ll_dir_aops;
+#else
+extern struct address_space_operations_ext ll_aops;
+extern struct address_space_operations_ext ll_dir_aops;
+#endif
#ifndef log2
#define log2(n) cfs_ffz(~(n))
/* force vfs to use lustre handler for flock() calls - bug 10743 */
sb->s_flags |= MS_FLOCK_LOCK;
#endif
+#ifdef MS_HAS_NEW_AOPS
+ sb->s_flags |= MS_HAS_NEW_AOPS;
+#endif
if (sbi->ll_flags & LL_SBI_FLOCK)
sbi->ll_fop = &ll_file_operations_flock;
struct ll_sb_info *sbi = ll_i2sbi(inode);
inode->i_op = &ll_file_inode_operations;
inode->i_fop = sbi->ll_fop;
- inode->i_mapping->a_ops = &ll_aops;
+ inode->i_mapping->a_ops = (struct address_space_operations *)&ll_aops;
EXIT;
} else if (S_ISDIR(inode->i_mode)) {
inode->i_op = &ll_dir_inode_operations;
inode->i_fop = &ll_dir_operations;
- inode->i_mapping->a_ops = &ll_dir_aops;
+ inode->i_mapping->a_ops = (struct address_space_operations *)&ll_dir_aops;
EXIT;
} else if (S_ISLNK(inode->i_mode)) {
inode->i_op = &ll_fast_symlink_inode_operations;