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: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>

authored by

Dave Chinner and committed by
Christoph Hellwig
abc10647 1da8eeca

+6 -20
+4 -18
fs/xfs/linux-2.6/xfs_sync.c
··· 385 int count = 0, pincount; 386 387 xfs_flush_buftarg(mp->m_ddev_targp, 0); 388 - xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); 389 390 /* 391 * This loop must run at least twice. The first instance of the loop ··· 509 510 if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { 511 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); 512 - xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); 513 /* dgc: errors ignored here */ 514 error = xfs_qm_sync(mp, SYNC_BDFLUSH); 515 error = xfs_sync_fsdata(mp, SYNC_BDFLUSH); ··· 703 xfs_reclaim_inodes_ag( 704 xfs_mount_t *mp, 705 int ag, 706 - int noblock, 707 int mode) 708 { 709 xfs_inode_t *ip = NULL; ··· 748 continue; 749 } 750 751 - if (noblock) { 752 - if (!xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) { 753 - read_unlock(&pag->pag_ici_lock); 754 - continue; 755 - } 756 - if (xfs_ipincount(ip) || 757 - !xfs_iflock_nowait(ip)) { 758 - xfs_iunlock(ip, XFS_ILOCK_EXCL); 759 - read_unlock(&pag->pag_ici_lock); 760 - continue; 761 - } 762 - } 763 read_unlock(&pag->pag_ici_lock); 764 765 /* 766 * hmmm - this is an inode already in reclaim. Do 767 * we even bother catching it here? 768 */ 769 - if (xfs_reclaim_inode(ip, noblock, mode)) 770 skipped++; 771 } while (nr_found); 772 ··· 769 int 770 xfs_reclaim_inodes( 771 xfs_mount_t *mp, 772 - int noblock, 773 int mode) 774 { 775 int i; ··· 776 for (i = 0; i < mp->m_sb.sb_agcount; i++) { 777 if (!mp->m_perag[i].pag_ici_init) 778 continue; 779 - xfs_reclaim_inodes_ag(mp, i, noblock, mode); 780 } 781 return 0; 782 }
··· 385 int count = 0, pincount; 386 387 xfs_flush_buftarg(mp->m_ddev_targp, 0); 388 + xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); 389 390 /* 391 * This loop must run at least twice. The first instance of the loop ··· 509 510 if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { 511 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); 512 + xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); 513 /* dgc: errors ignored here */ 514 error = xfs_qm_sync(mp, SYNC_BDFLUSH); 515 error = xfs_sync_fsdata(mp, SYNC_BDFLUSH); ··· 703 xfs_reclaim_inodes_ag( 704 xfs_mount_t *mp, 705 int ag, 706 int mode) 707 { 708 xfs_inode_t *ip = NULL; ··· 749 continue; 750 } 751 752 read_unlock(&pag->pag_ici_lock); 753 754 /* 755 * hmmm - this is an inode already in reclaim. Do 756 * we even bother catching it here? 757 */ 758 + if (xfs_reclaim_inode(ip, 0, mode)) 759 skipped++; 760 } while (nr_found); 761 ··· 782 int 783 xfs_reclaim_inodes( 784 xfs_mount_t *mp, 785 int mode) 786 { 787 int i; ··· 790 for (i = 0; i < mp->m_sb.sb_agcount; i++) { 791 if (!mp->m_perag[i].pag_ici_init) 792 continue; 793 + xfs_reclaim_inodes_ag(mp, i, mode); 794 } 795 return 0; 796 }
+1 -1
fs/xfs/linux-2.6/xfs_sync.h
··· 48 void xfs_flush_inodes(struct xfs_inode *ip); 49 50 int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode); 51 - int xfs_reclaim_inodes(struct xfs_mount *mp, int noblock, int mode); 52 53 void xfs_inode_set_reclaim_tag(struct xfs_inode *ip); 54 void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip);
··· 48 void xfs_flush_inodes(struct xfs_inode *ip); 49 50 int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode); 51 + int xfs_reclaim_inodes(struct xfs_mount *mp, int mode); 52 53 void xfs_inode_set_reclaim_tag(struct xfs_inode *ip); 54 void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip);
+1 -1
fs/xfs/xfs_mount.c
··· 1371 * need to force the log first. 1372 */ 1373 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC); 1374 - xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_ASYNC); 1375 1376 xfs_qm_unmount(mp); 1377
··· 1371 * need to force the log first. 1372 */ 1373 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC); 1374 + xfs_reclaim_inodes(mp, XFS_IFLUSH_ASYNC); 1375 1376 xfs_qm_unmount(mp); 1377