aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2009-06-08 09:35:12 -0400
committerChristoph Hellwig <hch@brick.lst.de>2009-06-08 09:35:12 -0400
commitabc1064742604e60a47a65fa3214dc1a84db093d (patch)
treeeeefefeaae0783b8943e99b68b27547c575d5194 /fs
parent1da8eecab5f866b4f5be43adbaadf18e259a8cc5 (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.c22
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.h2
-rw-r--r--fs/xfs/xfs_mount.c2
3 files changed, 6 insertions, 20 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index c91d5b2a568e..7eb9d9cca52a 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -385,7 +385,7 @@ xfs_quiesce_fs(
385 int count = 0, pincount; 385 int count = 0, pincount;
386 386
387 xfs_flush_buftarg(mp->m_ddev_targp, 0); 387 xfs_flush_buftarg(mp->m_ddev_targp, 0);
388 xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); 388 xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
389 389
390 /* 390 /*
391 * This loop must run at least twice. The first instance of the loop 391 * This loop must run at least twice. The first instance of the loop
@@ -509,7 +509,7 @@ xfs_sync_worker(
509 509
510 if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { 510 if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
511 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); 511 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
512 xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); 512 xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
513 /* dgc: errors ignored here */ 513 /* dgc: errors ignored here */
514 error = xfs_qm_sync(mp, SYNC_BDFLUSH); 514 error = xfs_qm_sync(mp, SYNC_BDFLUSH);
515 error = xfs_sync_fsdata(mp, SYNC_BDFLUSH); 515 error = xfs_sync_fsdata(mp, SYNC_BDFLUSH);
@@ -703,7 +703,6 @@ STATIC void
703xfs_reclaim_inodes_ag( 703xfs_reclaim_inodes_ag(
704 xfs_mount_t *mp, 704 xfs_mount_t *mp,
705 int ag, 705 int ag,
706 int noblock,
707 int mode) 706 int mode)
708{ 707{
709 xfs_inode_t *ip = NULL; 708 xfs_inode_t *ip = NULL;
@@ -749,25 +748,13 @@ restart:
749 continue; 748 continue;
750 } 749 }
751 750
752 if (noblock) {
753 if (!xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) {
754 read_unlock(&pag->pag_ici_lock);
755 continue;
756 }
757 if (xfs_ipincount(ip) ||
758 !xfs_iflock_nowait(ip)) {
759 xfs_iunlock(ip, XFS_ILOCK_EXCL);
760 read_unlock(&pag->pag_ici_lock);
761 continue;
762 }
763 }
764 read_unlock(&pag->pag_ici_lock); 751 read_unlock(&pag->pag_ici_lock);
765 752
766 /* 753 /*
767 * hmmm - this is an inode already in reclaim. Do 754 * hmmm - this is an inode already in reclaim. Do
768 * we even bother catching it here? 755 * we even bother catching it here?
769 */ 756 */
770 if (xfs_reclaim_inode(ip, noblock, mode)) 757 if (xfs_reclaim_inode(ip, 0, mode))
771 skipped++; 758 skipped++;
772 } while (nr_found); 759 } while (nr_found);
773 760
@@ -782,7 +769,6 @@ restart:
782int 769int
783xfs_reclaim_inodes( 770xfs_reclaim_inodes(
784 xfs_mount_t *mp, 771 xfs_mount_t *mp,
785 int noblock,
786 int mode) 772 int mode)
787{ 773{
788 int i; 774 int i;
@@ -790,7 +776,7 @@ xfs_reclaim_inodes(
790 for (i = 0; i < mp->m_sb.sb_agcount; i++) { 776 for (i = 0; i < mp->m_sb.sb_agcount; i++) {
791 if (!mp->m_perag[i].pag_ici_init) 777 if (!mp->m_perag[i].pag_ici_init)
792 continue; 778 continue;
793 xfs_reclaim_inodes_ag(mp, i, noblock, mode); 779 xfs_reclaim_inodes_ag(mp, i, mode);
794 } 780 }
795 return 0; 781 return 0;
796} 782}
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h
index 308d5bf6dfbd..d7b2b5f1c387 100644
--- a/fs/xfs/linux-2.6/xfs_sync.h
+++ b/fs/xfs/linux-2.6/xfs_sync.h
@@ -48,7 +48,7 @@ void xfs_quiesce_attr(struct xfs_mount *mp);
48void xfs_flush_inodes(struct xfs_inode *ip); 48void xfs_flush_inodes(struct xfs_inode *ip);
49 49
50int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode); 50int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode);
51int xfs_reclaim_inodes(struct xfs_mount *mp, int noblock, int mode); 51int xfs_reclaim_inodes(struct xfs_mount *mp, int mode);
52 52
53void xfs_inode_set_reclaim_tag(struct xfs_inode *ip); 53void xfs_inode_set_reclaim_tag(struct xfs_inode *ip);
54void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip); 54void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip);
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index b659db5e7165..5c6f092659c1 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1371,7 +1371,7 @@ xfs_unmountfs(
1371 * need to force the log first. 1371 * need to force the log first.
1372 */ 1372 */
1373 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC); 1373 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC);
1374 xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_ASYNC); 1374 xfs_reclaim_inodes(mp, XFS_IFLUSH_ASYNC);
1375 1375
1376 xfs_qm_unmount(mp); 1376 xfs_qm_unmount(mp);
1377 1377