提交 abc10647 编写于 作者: D Dave Chinner 提交者: Christoph Hellwig

xfs: remove unused parameter from xfs_reclaim_inodes

The noblock parameter of xfs_reclaim_inodes is only ever set to zero. Remove
it and all the conditional code that is never executed.
Signed-off-by: NDave Chinner <david@fromorbit.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NEric Sandeen <sandeen@sandeen.net>
上级 1da8eeca
...@@ -385,7 +385,7 @@ xfs_quiesce_fs( ...@@ -385,7 +385,7 @@ xfs_quiesce_fs(
int count = 0, pincount; int count = 0, pincount;
xfs_flush_buftarg(mp->m_ddev_targp, 0); xfs_flush_buftarg(mp->m_ddev_targp, 0);
xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
/* /*
* This loop must run at least twice. The first instance of the loop * This loop must run at least twice. The first instance of the loop
...@@ -509,7 +509,7 @@ xfs_sync_worker( ...@@ -509,7 +509,7 @@ xfs_sync_worker(
if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
/* dgc: errors ignored here */ /* dgc: errors ignored here */
error = xfs_qm_sync(mp, SYNC_BDFLUSH); error = xfs_qm_sync(mp, SYNC_BDFLUSH);
error = xfs_sync_fsdata(mp, SYNC_BDFLUSH); error = xfs_sync_fsdata(mp, SYNC_BDFLUSH);
...@@ -703,7 +703,6 @@ STATIC void ...@@ -703,7 +703,6 @@ STATIC void
xfs_reclaim_inodes_ag( xfs_reclaim_inodes_ag(
xfs_mount_t *mp, xfs_mount_t *mp,
int ag, int ag,
int noblock,
int mode) int mode)
{ {
xfs_inode_t *ip = NULL; xfs_inode_t *ip = NULL;
...@@ -749,25 +748,13 @@ xfs_reclaim_inodes_ag( ...@@ -749,25 +748,13 @@ xfs_reclaim_inodes_ag(
continue; continue;
} }
if (noblock) {
if (!xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) {
read_unlock(&pag->pag_ici_lock);
continue;
}
if (xfs_ipincount(ip) ||
!xfs_iflock_nowait(ip)) {
xfs_iunlock(ip, XFS_ILOCK_EXCL);
read_unlock(&pag->pag_ici_lock);
continue;
}
}
read_unlock(&pag->pag_ici_lock); read_unlock(&pag->pag_ici_lock);
/* /*
* hmmm - this is an inode already in reclaim. Do * hmmm - this is an inode already in reclaim. Do
* we even bother catching it here? * we even bother catching it here?
*/ */
if (xfs_reclaim_inode(ip, noblock, mode)) if (xfs_reclaim_inode(ip, 0, mode))
skipped++; skipped++;
} while (nr_found); } while (nr_found);
...@@ -782,7 +769,6 @@ xfs_reclaim_inodes_ag( ...@@ -782,7 +769,6 @@ xfs_reclaim_inodes_ag(
int int
xfs_reclaim_inodes( xfs_reclaim_inodes(
xfs_mount_t *mp, xfs_mount_t *mp,
int noblock,
int mode) int mode)
{ {
int i; int i;
...@@ -790,7 +776,7 @@ xfs_reclaim_inodes( ...@@ -790,7 +776,7 @@ xfs_reclaim_inodes(
for (i = 0; i < mp->m_sb.sb_agcount; i++) { for (i = 0; i < mp->m_sb.sb_agcount; i++) {
if (!mp->m_perag[i].pag_ici_init) if (!mp->m_perag[i].pag_ici_init)
continue; continue;
xfs_reclaim_inodes_ag(mp, i, noblock, mode); xfs_reclaim_inodes_ag(mp, i, mode);
} }
return 0; return 0;
} }
......
...@@ -48,7 +48,7 @@ void xfs_quiesce_attr(struct xfs_mount *mp); ...@@ -48,7 +48,7 @@ void xfs_quiesce_attr(struct xfs_mount *mp);
void xfs_flush_inodes(struct xfs_inode *ip); void xfs_flush_inodes(struct xfs_inode *ip);
int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode); int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode);
int xfs_reclaim_inodes(struct xfs_mount *mp, int noblock, int mode); int xfs_reclaim_inodes(struct xfs_mount *mp, int mode);
void xfs_inode_set_reclaim_tag(struct xfs_inode *ip); void xfs_inode_set_reclaim_tag(struct xfs_inode *ip);
void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip); void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip);
......
...@@ -1371,7 +1371,7 @@ xfs_unmountfs( ...@@ -1371,7 +1371,7 @@ xfs_unmountfs(
* need to force the log first. * need to force the log first.
*/ */
xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC); xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC);
xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_ASYNC); xfs_reclaim_inodes(mp, XFS_IFLUSH_ASYNC);
xfs_qm_unmount(mp); xfs_qm_unmount(mp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册