diff options
author | Ben Myers <bpm@sgi.com> | 2013-09-10 19:11:22 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-10-01 18:38:16 -0400 |
commit | d948709b8e468510d8c855d1e4c9f1cb7b524880 (patch) | |
tree | ea4af275dd326cc4a6e83927996dc4ac3592b535 /fs/xfs | |
parent | 17ec81c15fd022842f9bc947841ba9fb9eb52591 (diff) |
xfs: remove usage of is_bad_inode
XFS never calls mark_inode_bad or iget_failed, so it will never see a
bad inode. Remove all checks for is_bad_inode because they are
unnecessary.
Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_icache.c | 7 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_super.c | 9 |
3 files changed, 1 insertions, 17 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 474807a401c8..76a4ecd638c3 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c | |||
@@ -500,11 +500,6 @@ xfs_inode_ag_walk_grab( | |||
500 | if (!igrab(inode)) | 500 | if (!igrab(inode)) |
501 | return ENOENT; | 501 | return ENOENT; |
502 | 502 | ||
503 | if (is_bad_inode(inode)) { | ||
504 | IRELE(ip); | ||
505 | return ENOENT; | ||
506 | } | ||
507 | |||
508 | /* inode is valid */ | 503 | /* inode is valid */ |
509 | return 0; | 504 | return 0; |
510 | 505 | ||
@@ -918,8 +913,6 @@ restart: | |||
918 | xfs_iflock(ip); | 913 | xfs_iflock(ip); |
919 | } | 914 | } |
920 | 915 | ||
921 | if (is_bad_inode(VFS_I(ip))) | ||
922 | goto reclaim; | ||
923 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) { | 916 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) { |
924 | xfs_iunpin_wait(ip); | 917 | xfs_iunpin_wait(ip); |
925 | xfs_iflush_abort(ip, false); | 918 | xfs_iflush_abort(ip, false); |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index e3d75385aa76..5ac716b2df22 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1687,7 +1687,7 @@ xfs_inactive( | |||
1687 | * If the inode is already free, then there can be nothing | 1687 | * If the inode is already free, then there can be nothing |
1688 | * to clean up here. | 1688 | * to clean up here. |
1689 | */ | 1689 | */ |
1690 | if (ip->i_d.di_mode == 0 || is_bad_inode(VFS_I(ip))) { | 1690 | if (ip->i_d.di_mode == 0) { |
1691 | ASSERT(ip->i_df.if_real_bytes == 0); | 1691 | ASSERT(ip->i_df.if_real_bytes == 0); |
1692 | ASSERT(ip->i_df.if_broot_bytes == 0); | 1692 | ASSERT(ip->i_df.if_broot_bytes == 0); |
1693 | return VN_INACTIVE_CACHE; | 1693 | return VN_INACTIVE_CACHE; |
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 15188cc99449..938e50fe6c61 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -946,10 +946,6 @@ xfs_fs_destroy_inode( | |||
946 | 946 | ||
947 | XFS_STATS_INC(vn_reclaim); | 947 | XFS_STATS_INC(vn_reclaim); |
948 | 948 | ||
949 | /* bad inode, get out here ASAP */ | ||
950 | if (is_bad_inode(inode)) | ||
951 | goto out_reclaim; | ||
952 | |||
953 | ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); | 949 | ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); |
954 | 950 | ||
955 | /* | 951 | /* |
@@ -965,7 +961,6 @@ xfs_fs_destroy_inode( | |||
965 | * this more efficiently than we can here, so simply let background | 961 | * this more efficiently than we can here, so simply let background |
966 | * reclaim tear down all inodes. | 962 | * reclaim tear down all inodes. |
967 | */ | 963 | */ |
968 | out_reclaim: | ||
969 | xfs_inode_set_reclaim_tag(ip); | 964 | xfs_inode_set_reclaim_tag(ip); |
970 | } | 965 | } |
971 | 966 | ||
@@ -1491,10 +1486,6 @@ xfs_fs_fill_super( | |||
1491 | error = ENOENT; | 1486 | error = ENOENT; |
1492 | goto out_unmount; | 1487 | goto out_unmount; |
1493 | } | 1488 | } |
1494 | if (is_bad_inode(root)) { | ||
1495 | error = EINVAL; | ||
1496 | goto out_unmount; | ||
1497 | } | ||
1498 | sb->s_root = d_make_root(root); | 1489 | sb->s_root = d_make_root(root); |
1499 | if (!sb->s_root) { | 1490 | if (!sb->s_root) { |
1500 | error = ENOMEM; | 1491 | error = ENOMEM; |