diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index c6ef684bf2e3..bb535a7737b5 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -875,13 +875,18 @@ xfs_fs_alloc_inode( | |||
875 | } | 875 | } |
876 | 876 | ||
877 | /* | 877 | /* |
878 | * we need to provide an empty inode free function to prevent | 878 | * Now that the generic code is guaranteed not to be accessing |
879 | * the generic code from trying to free our combined inode. | 879 | * the linux inode, we can reclaim the inode. |
880 | */ | 880 | */ |
881 | STATIC void | 881 | STATIC void |
882 | xfs_fs_destroy_inode( | 882 | xfs_fs_destroy_inode( |
883 | struct inode *inode) | 883 | struct inode *inode) |
884 | { | 884 | { |
885 | xfs_inode_t *ip = XFS_I(inode); | ||
886 | |||
887 | XFS_STATS_INC(vn_reclaim); | ||
888 | if (xfs_reclaim(ip)) | ||
889 | panic("%s: cannot reclaim 0x%p\n", __func__, inode); | ||
885 | } | 890 | } |
886 | 891 | ||
887 | /* | 892 | /* |
@@ -958,22 +963,13 @@ xfs_fs_clear_inode( | |||
958 | { | 963 | { |
959 | xfs_inode_t *ip = XFS_I(inode); | 964 | xfs_inode_t *ip = XFS_I(inode); |
960 | 965 | ||
961 | /* | 966 | xfs_itrace_entry(ip); |
962 | * ip can be null when xfs_iget_core calls xfs_idestroy if we | 967 | XFS_STATS_INC(vn_rele); |
963 | * find an inode with di_mode == 0 but without IGET_CREATE set. | 968 | XFS_STATS_INC(vn_remove); |
964 | */ | 969 | XFS_STATS_DEC(vn_active); |
965 | if (ip) { | 970 | |
966 | xfs_itrace_entry(ip); | 971 | xfs_inactive(ip); |
967 | XFS_STATS_INC(vn_rele); | 972 | xfs_iflags_clear(ip, XFS_IMODIFIED); |
968 | XFS_STATS_INC(vn_remove); | ||
969 | XFS_STATS_INC(vn_reclaim); | ||
970 | XFS_STATS_DEC(vn_active); | ||
971 | |||
972 | xfs_inactive(ip); | ||
973 | xfs_iflags_clear(ip, XFS_IMODIFIED); | ||
974 | if (xfs_reclaim(ip)) | ||
975 | panic("%s: cannot reclaim 0x%p\n", __func__, inode); | ||
976 | } | ||
977 | } | 973 | } |
978 | 974 | ||
979 | STATIC void | 975 | STATIC void |