diff options
author | Dave Chinner <david@fromorbit.com> | 2016-05-20 02:34:00 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-05-20 02:34:00 +0200 |
commit | 555b67e4e729ca544bb4028ab12e532c68b70ddb (patch) | |
tree | 8bfb59ccca39cebe0210366bebfeddd8bd3ab3a3 /fs/xfs/xfs_super.c | |
parent | Merge branch 'xfs-4.7-error-cfg' into for-next (diff) | |
parent | xfs: move reclaim tagging functions (diff) | |
download | linux-555b67e4e729ca544bb4028ab12e532c68b70ddb.tar.xz linux-555b67e4e729ca544bb4028ab12e532c68b70ddb.zip |
Merge branch 'xfs-4.7-inode-reclaim' into for-next
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index b412bb1c5fd3..d8424f5c5e74 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -928,7 +928,7 @@ xfs_fs_alloc_inode( /* * Now that the generic code is guaranteed not to be accessing - * the linux inode, we can reclaim the inode. + * the linux inode, we can inactivate and reclaim the inode. */ STATIC void xfs_fs_destroy_inode( @@ -938,9 +938,14 @@ xfs_fs_destroy_inode( trace_xfs_destroy_inode(ip); - XFS_STATS_INC(ip->i_mount, vn_reclaim); + ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock)); + XFS_STATS_INC(ip->i_mount, vn_rele); + XFS_STATS_INC(ip->i_mount, vn_remove); + + xfs_inactive(ip); ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); + XFS_STATS_INC(ip->i_mount, vn_reclaim); /* * We should never get here with one of the reclaim flags already set. @@ -987,24 +992,6 @@ xfs_fs_inode_init_once( "xfsino", ip->i_ino); } -STATIC void -xfs_fs_evict_inode( - struct inode *inode) -{ - xfs_inode_t *ip = XFS_I(inode); - - ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock)); - - trace_xfs_evict_inode(ip); - - truncate_inode_pages_final(&inode->i_data); - clear_inode(inode); - XFS_STATS_INC(ip->i_mount, vn_rele); - XFS_STATS_INC(ip->i_mount, vn_remove); - - xfs_inactive(ip); -} - /* * We do an unlocked check for XFS_IDONTCACHE here because we are already * serialised against cache hits here via the inode->i_lock and igrab() in @@ -1673,7 +1660,6 @@ xfs_fs_free_cached_objects( static const struct super_operations xfs_super_operations = { .alloc_inode = xfs_fs_alloc_inode, .destroy_inode = xfs_fs_destroy_inode, - .evict_inode = xfs_fs_evict_inode, .drop_inode = xfs_fs_drop_inode, .put_super = xfs_fs_put_super, .sync_fs = xfs_fs_sync_fs, |