diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 18a4b8e11df2..a82a93db67c2 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -930,13 +930,39 @@ xfs_fs_alloc_inode( | |||
930 | */ | 930 | */ |
931 | STATIC void | 931 | STATIC void |
932 | xfs_fs_destroy_inode( | 932 | xfs_fs_destroy_inode( |
933 | struct inode *inode) | 933 | struct inode *inode) |
934 | { | 934 | { |
935 | xfs_inode_t *ip = XFS_I(inode); | 935 | struct xfs_inode *ip = XFS_I(inode); |
936 | |||
937 | xfs_itrace_entry(ip); | ||
936 | 938 | ||
937 | XFS_STATS_INC(vn_reclaim); | 939 | XFS_STATS_INC(vn_reclaim); |
938 | if (xfs_reclaim(ip)) | 940 | |
939 | panic("%s: cannot reclaim 0x%p\n", __func__, inode); | 941 | /* bad inode, get out here ASAP */ |
942 | if (is_bad_inode(inode)) | ||
943 | goto out_reclaim; | ||
944 | |||
945 | xfs_ioend_wait(ip); | ||
946 | |||
947 | ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); | ||
948 | |||
949 | /* | ||
950 | * We should never get here with one of the reclaim flags already set. | ||
951 | */ | ||
952 | ASSERT_ALWAYS(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); | ||
953 | ASSERT_ALWAYS(!xfs_iflags_test(ip, XFS_IRECLAIM)); | ||
954 | |||
955 | /* | ||
956 | * If we have nothing to flush with this inode then complete the | ||
957 | * teardown now, otherwise delay the flush operation. | ||
958 | */ | ||
959 | if (!xfs_inode_clean(ip)) { | ||
960 | xfs_inode_set_reclaim_tag(ip); | ||
961 | return; | ||
962 | } | ||
963 | |||
964 | out_reclaim: | ||
965 | xfs_ireclaim(ip); | ||
940 | } | 966 | } |
941 | 967 | ||
942 | /* | 968 | /* |