aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_buf.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-01-13 17:17:58 -0500
committerAlex Elder <aelder@sgi.com>2010-01-15 16:35:07 -0500
commit64e0bc7d2a6609ad265757a600e2a0d93c8adb47 (patch)
tree15733d61868f4dbd59da833cd84614ff78ef1049 /fs/xfs/linux-2.6/xfs_buf.h
parent873ff5501d8cd1a21045d6c1da34f0c3876bc235 (diff)
xfs: clean up xfs_bwrite
Fold XFS_bwrite into it's only caller, xfs_bwrite and move it into xfs_buf.c instead of leaving it as a fairly large inline function. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.h19
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index c20a76001867..f69b8e714a11 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -232,6 +232,7 @@ extern void xfs_buf_lock(xfs_buf_t *);
232extern void xfs_buf_unlock(xfs_buf_t *); 232extern void xfs_buf_unlock(xfs_buf_t *);
233 233
234/* Buffer Read and Write Routines */ 234/* Buffer Read and Write Routines */
235extern int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp);
235extern int xfs_bawrite(void *mp, xfs_buf_t *bp); 236extern int xfs_bawrite(void *mp, xfs_buf_t *bp);
236extern void xfs_bdwrite(void *mp, xfs_buf_t *bp); 237extern void xfs_bdwrite(void *mp, xfs_buf_t *bp);
237extern void xfs_buf_ioend(xfs_buf_t *, int); 238extern void xfs_buf_ioend(xfs_buf_t *, int);
@@ -390,24 +391,6 @@ static inline void xfs_buf_relse(xfs_buf_t *bp)
390#define xfs_biozero(bp, off, len) \ 391#define xfs_biozero(bp, off, len) \
391 xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO) 392 xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO)
392 393
393
394static inline int XFS_bwrite(xfs_buf_t *bp)
395{
396 int iowait = (bp->b_flags & XBF_ASYNC) == 0;
397 int error = 0;
398
399 if (!iowait)
400 bp->b_flags |= _XBF_RUN_QUEUES;
401
402 xfs_buf_delwri_dequeue(bp);
403 xfs_buf_iostrategy(bp);
404 if (iowait) {
405 error = xfs_buf_iowait(bp);
406 xfs_buf_relse(bp);
407 }
408 return error;
409}
410
411#define xfs_iowait(bp) xfs_buf_iowait(bp) 394#define xfs_iowait(bp) xfs_buf_iowait(bp)
412 395
413#define xfs_baread(target, rablkno, ralen) \ 396#define xfs_baread(target, rablkno, ralen) \