AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h])
AC_CHECK_LINUX_STRUCT([super_operations], [alloc_inode],
[fs.h])
+ AC_CHECK_LINUX_STRUCT([super_operations], [evict_inode],
+ [fs.h])
AC_CHECK_LINUX_STRUCT([task_struct], [cred], [sched.h])
AC_CHECK_LINUX_STRUCT([task_struct], [exit_state], [sched.h])
AC_CHECK_LINUX_STRUCT([task_struct], [parent], [sched.h])
}
#endif
+#if defined(STRUCT_SUPER_OPERATIONS_HAS_EVICT_INODE)
+static void
+afs_evict_inode(struct inode *ip)
+{
+ struct vcache *vcp = VTOAFS(ip);
+
+ if (vcp->vlruq.prev || vcp->vlruq.next)
+ osi_Panic("inode freed while on LRU");
+ if (vcp->hnext)
+ osi_Panic("inode freed while still hashed");
+
+ truncate_inode_pages(&ip->i_data, 0);
+ end_writeback(ip);
+
+#if !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE)
+ afs_osi_Free(ip->u.generic_ip, sizeof(struct vcache));
+#endif
+}
+#else
static void
afs_clear_inode(struct inode *ip)
{
afs_osi_Free(ip->u.generic_ip, sizeof(struct vcache));
#endif
}
+#endif
/* afs_put_super
* Called from unmount to release super_block. */
.alloc_inode = afs_alloc_inode,
.destroy_inode = afs_destroy_inode,
#endif
+#if defined(STRUCT_SUPER_OPERATIONS_HAS_EVICT_INODE)
+ .evict_inode = afs_evict_inode,
+#else
.clear_inode = afs_clear_inode,
+#endif
.put_super = afs_put_super,
.statfs = afs_statfs,
};