summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_sync.c
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-10-30 17:15:12 +1100
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 17:15:12 +1100
commit2030b5aba8a4bcaca5aca85968514fa58207d3bd (patch)
treee01122f234efd0acad9c3217ffae05f023f8b247 /fs/xfs/linux-2.6/xfs_sync.c
parentbc60a99323b3ec628273b5fa998285c87d464ca6 (diff)
[XFS] use xfs_sync_inodes rather than xfs_syncsub
Kill the unused arg in xfs_syncsub() and xfs_sync_inodes(). For callers of xfs_syncsub() that only want to flush inodes, replace xfs_syncsub() with direct calls to xfs_sync_inodes() as that is all that is being done with the specific flags being passed in. SGI-PV: 988140 SGI-Modid: xfs-linux-melb:xfs-kern:32305a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index 461c1dc35d3..7e9fb5251b2 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -117,7 +117,7 @@ xfs_sync(
if (flags & SYNC_IOWAIT)
xfs_filestream_flush(mp);
- return xfs_syncsub(mp, flags, NULL);
+ return xfs_syncsub(mp, flags);
}
/*
@@ -128,8 +128,7 @@ STATIC int
xfs_sync_inodes_ag(
xfs_mount_t *mp,
int ag,
- int flags,
- int *bypassed)
+ int flags)
{
xfs_perag_t *pag = &mp->m_perag[ag];
int nr_found;
@@ -260,8 +259,6 @@ xfs_sync_inodes_ag(
error = xfs_iflush(ip, XFS_IFLUSH_DELWRI);
else
xfs_ifunlock(ip);
- } else if (bypassed) {
- (*bypassed)++;
}
}
@@ -288,15 +285,12 @@ xfs_sync_inodes_ag(
int
xfs_sync_inodes(
xfs_mount_t *mp,
- int flags,
- int *bypassed)
+ int flags)
{
int error;
int last_error;
int i;
- if (bypassed)
- *bypassed = 0;
if (mp->m_flags & XFS_MOUNT_RDONLY)
return 0;
error = 0;
@@ -305,7 +299,7 @@ xfs_sync_inodes(
for (i = 0; i < mp->m_sb.sb_agcount; i++) {
if (!mp->m_perag[i].pag_ici_init)
continue;
- error = xfs_sync_inodes_ag(mp, i, flags, bypassed);
+ error = xfs_sync_inodes_ag(mp, i, flags);
if (error)
last_error = error;
if (error == EFSCORRUPTED)
@@ -408,11 +402,10 @@ xfs_sync_fsdata(
* interface as explained above under xfs_sync.
*
*/
-int
+STATIC int
xfs_syncsub(
xfs_mount_t *mp,
- int flags,
- int *bypassed)
+ int flags)
{
int error = 0;
int last_error = 0;
@@ -431,7 +424,7 @@ xfs_syncsub(
if (flags & SYNC_BDFLUSH)
xfs_finish_reclaim_all(mp, 1, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
else
- error = xfs_sync_inodes(mp, flags, bypassed);
+ error = xfs_sync_inodes(mp, flags);
}
/*