diff options
author | David Chinner <david@fromorbit.com> | 2008-10-30 02:15:12 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 02:15:12 -0400 |
commit | 2030b5aba8a4bcaca5aca85968514fa58207d3bd (patch) | |
tree | e01122f234efd0acad9c3217ffae05f023f8b247 /fs/xfs/linux-2.6 | |
parent | bc60a99323b3ec628273b5fa998285c87d464ca6 (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')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 21 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.h | 2 |
2 files changed, 8 insertions, 15 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 461c1dc35d37..7e9fb5251b2e 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( | |||
117 | if (flags & SYNC_IOWAIT) | 117 | if (flags & SYNC_IOWAIT) |
118 | xfs_filestream_flush(mp); | 118 | xfs_filestream_flush(mp); |
119 | 119 | ||
120 | return xfs_syncsub(mp, flags, NULL); | 120 | return xfs_syncsub(mp, flags); |
121 | } | 121 | } |
122 | 122 | ||
123 | /* | 123 | /* |
@@ -128,8 +128,7 @@ STATIC int | |||
128 | xfs_sync_inodes_ag( | 128 | xfs_sync_inodes_ag( |
129 | xfs_mount_t *mp, | 129 | xfs_mount_t *mp, |
130 | int ag, | 130 | int ag, |
131 | int flags, | 131 | int flags) |
132 | int *bypassed) | ||
133 | { | 132 | { |
134 | xfs_perag_t *pag = &mp->m_perag[ag]; | 133 | xfs_perag_t *pag = &mp->m_perag[ag]; |
135 | int nr_found; | 134 | int nr_found; |
@@ -260,8 +259,6 @@ xfs_sync_inodes_ag( | |||
260 | error = xfs_iflush(ip, XFS_IFLUSH_DELWRI); | 259 | error = xfs_iflush(ip, XFS_IFLUSH_DELWRI); |
261 | else | 260 | else |
262 | xfs_ifunlock(ip); | 261 | xfs_ifunlock(ip); |
263 | } else if (bypassed) { | ||
264 | (*bypassed)++; | ||
265 | } | 262 | } |
266 | } | 263 | } |
267 | 264 | ||
@@ -288,15 +285,12 @@ xfs_sync_inodes_ag( | |||
288 | int | 285 | int |
289 | xfs_sync_inodes( | 286 | xfs_sync_inodes( |
290 | xfs_mount_t *mp, | 287 | xfs_mount_t *mp, |
291 | int flags, | 288 | int flags) |
292 | int *bypassed) | ||
293 | { | 289 | { |
294 | int error; | 290 | int error; |
295 | int last_error; | 291 | int last_error; |
296 | int i; | 292 | int i; |
297 | 293 | ||
298 | if (bypassed) | ||
299 | *bypassed = 0; | ||
300 | if (mp->m_flags & XFS_MOUNT_RDONLY) | 294 | if (mp->m_flags & XFS_MOUNT_RDONLY) |
301 | return 0; | 295 | return 0; |
302 | error = 0; | 296 | error = 0; |
@@ -305,7 +299,7 @@ xfs_sync_inodes( | |||
305 | for (i = 0; i < mp->m_sb.sb_agcount; i++) { | 299 | for (i = 0; i < mp->m_sb.sb_agcount; i++) { |
306 | if (!mp->m_perag[i].pag_ici_init) | 300 | if (!mp->m_perag[i].pag_ici_init) |
307 | continue; | 301 | continue; |
308 | error = xfs_sync_inodes_ag(mp, i, flags, bypassed); | 302 | error = xfs_sync_inodes_ag(mp, i, flags); |
309 | if (error) | 303 | if (error) |
310 | last_error = error; | 304 | last_error = error; |
311 | if (error == EFSCORRUPTED) | 305 | if (error == EFSCORRUPTED) |
@@ -408,11 +402,10 @@ xfs_sync_fsdata( | |||
408 | * interface as explained above under xfs_sync. | 402 | * interface as explained above under xfs_sync. |
409 | * | 403 | * |
410 | */ | 404 | */ |
411 | int | 405 | STATIC int |
412 | xfs_syncsub( | 406 | xfs_syncsub( |
413 | xfs_mount_t *mp, | 407 | xfs_mount_t *mp, |
414 | int flags, | 408 | int flags) |
415 | int *bypassed) | ||
416 | { | 409 | { |
417 | int error = 0; | 410 | int error = 0; |
418 | int last_error = 0; | 411 | int last_error = 0; |
@@ -431,7 +424,7 @@ xfs_syncsub( | |||
431 | if (flags & SYNC_BDFLUSH) | 424 | if (flags & SYNC_BDFLUSH) |
432 | xfs_finish_reclaim_all(mp, 1, XFS_IFLUSH_DELWRI_ELSE_ASYNC); | 425 | xfs_finish_reclaim_all(mp, 1, XFS_IFLUSH_DELWRI_ELSE_ASYNC); |
433 | else | 426 | else |
434 | error = xfs_sync_inodes(mp, flags, bypassed); | 427 | error = xfs_sync_inodes(mp, flags); |
435 | } | 428 | } |
436 | 429 | ||
437 | /* | 430 | /* |
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h index 3746d153ec8e..295486199406 100644 --- a/fs/xfs/linux-2.6/xfs_sync.h +++ b/fs/xfs/linux-2.6/xfs_sync.h | |||
@@ -55,7 +55,7 @@ int xfs_syncd_init(struct xfs_mount *mp); | |||
55 | void xfs_syncd_stop(struct xfs_mount *mp); | 55 | void xfs_syncd_stop(struct xfs_mount *mp); |
56 | 56 | ||
57 | int xfs_sync(struct xfs_mount *mp, int flags); | 57 | int xfs_sync(struct xfs_mount *mp, int flags); |
58 | int xfs_syncsub(struct xfs_mount *mp, int flags, int *bypassed); | 58 | int xfs_sync_inodes(struct xfs_mount *mp, int flags); |
59 | 59 | ||
60 | void xfs_flush_inode(struct xfs_inode *ip); | 60 | void xfs_flush_inode(struct xfs_inode *ip); |
61 | void xfs_flush_device(struct xfs_inode *ip); | 61 | void xfs_flush_device(struct xfs_inode *ip); |