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>
This commit is contained in:
Родитель
17ec81c15f
Коммит
d948709b8e
|
@ -500,11 +500,6 @@ xfs_inode_ag_walk_grab(
|
||||||
if (!igrab(inode))
|
if (!igrab(inode))
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
|
|
||||||
if (is_bad_inode(inode)) {
|
|
||||||
IRELE(ip);
|
|
||||||
return ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* inode is valid */
|
/* inode is valid */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -918,8 +913,6 @@ restart:
|
||||||
xfs_iflock(ip);
|
xfs_iflock(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_bad_inode(VFS_I(ip)))
|
|
||||||
goto reclaim;
|
|
||||||
if (XFS_FORCED_SHUTDOWN(ip->i_mount)) {
|
if (XFS_FORCED_SHUTDOWN(ip->i_mount)) {
|
||||||
xfs_iunpin_wait(ip);
|
xfs_iunpin_wait(ip);
|
||||||
xfs_iflush_abort(ip, false);
|
xfs_iflush_abort(ip, false);
|
||||||
|
|
|
@ -1687,7 +1687,7 @@ xfs_inactive(
|
||||||
* If the inode is already free, then there can be nothing
|
* If the inode is already free, then there can be nothing
|
||||||
* to clean up here.
|
* to clean up here.
|
||||||
*/
|
*/
|
||||||
if (ip->i_d.di_mode == 0 || is_bad_inode(VFS_I(ip))) {
|
if (ip->i_d.di_mode == 0) {
|
||||||
ASSERT(ip->i_df.if_real_bytes == 0);
|
ASSERT(ip->i_df.if_real_bytes == 0);
|
||||||
ASSERT(ip->i_df.if_broot_bytes == 0);
|
ASSERT(ip->i_df.if_broot_bytes == 0);
|
||||||
return VN_INACTIVE_CACHE;
|
return VN_INACTIVE_CACHE;
|
||||||
|
|
|
@ -946,10 +946,6 @@ xfs_fs_destroy_inode(
|
||||||
|
|
||||||
XFS_STATS_INC(vn_reclaim);
|
XFS_STATS_INC(vn_reclaim);
|
||||||
|
|
||||||
/* bad inode, get out here ASAP */
|
|
||||||
if (is_bad_inode(inode))
|
|
||||||
goto out_reclaim;
|
|
||||||
|
|
||||||
ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0);
|
ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -965,7 +961,6 @@ xfs_fs_destroy_inode(
|
||||||
* this more efficiently than we can here, so simply let background
|
* this more efficiently than we can here, so simply let background
|
||||||
* reclaim tear down all inodes.
|
* reclaim tear down all inodes.
|
||||||
*/
|
*/
|
||||||
out_reclaim:
|
|
||||||
xfs_inode_set_reclaim_tag(ip);
|
xfs_inode_set_reclaim_tag(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1491,10 +1486,6 @@ xfs_fs_fill_super(
|
||||||
error = ENOENT;
|
error = ENOENT;
|
||||||
goto out_unmount;
|
goto out_unmount;
|
||||||
}
|
}
|
||||||
if (is_bad_inode(root)) {
|
|
||||||
error = EINVAL;
|
|
||||||
goto out_unmount;
|
|
||||||
}
|
|
||||||
sb->s_root = d_make_root(root);
|
sb->s_root = d_make_root(root);
|
||||||
if (!sb->s_root) {
|
if (!sb->s_root) {
|
||||||
error = ENOMEM;
|
error = ENOMEM;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче