Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

Ben Myers d948709b 17ec81c1

+1 -17
-7
fs/xfs/xfs_icache.c
··· 500 500 if (!igrab(inode)) 501 501 return ENOENT; 502 502 503 - if (is_bad_inode(inode)) { 504 - IRELE(ip); 505 - return ENOENT; 506 - } 507 - 508 503 /* inode is valid */ 509 504 return 0; 510 505 ··· 913 918 xfs_iflock(ip); 914 919 } 915 920 916 - if (is_bad_inode(VFS_I(ip))) 917 - goto reclaim; 918 921 if (XFS_FORCED_SHUTDOWN(ip->i_mount)) { 919 922 xfs_iunpin_wait(ip); 920 923 xfs_iflush_abort(ip, false);
+1 -1
fs/xfs/xfs_inode.c
··· 1687 1687 * If the inode is already free, then there can be nothing 1688 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 1691 ASSERT(ip->i_df.if_real_bytes == 0); 1692 1692 ASSERT(ip->i_df.if_broot_bytes == 0); 1693 1693 return VN_INACTIVE_CACHE;
-9
fs/xfs/xfs_super.c
··· 946 946 947 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 949 ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); 954 950 955 951 /* ··· 961 965 * this more efficiently than we can here, so simply let background 962 966 * reclaim tear down all inodes. 963 967 */ 964 - out_reclaim: 965 968 xfs_inode_set_reclaim_tag(ip); 966 969 } 967 970 ··· 1484 1489 root = igrab(VFS_I(mp->m_rootip)); 1485 1490 if (!root) { 1486 1491 error = ENOENT; 1487 - goto out_unmount; 1488 - } 1489 - if (is_bad_inode(root)) { 1490 - error = EINVAL; 1491 1492 goto out_unmount; 1492 1493 } 1493 1494 sb->s_root = d_make_root(root);