xfs: simplify xfs_buf_get / xfs_buf_read interfaces

Currently the low-level buffer cache interfaces are highly confusing
as we have a _flags variant of each that does actually respect the
flags, and one without _flags which has a flags argument that gets
ignored and overriden with a default set.  Given that very few places
use the default arguments get rid of the duplication and convert all
callers to pass the flags explicitly.  Also remove the now confusing
_flags postfix.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
Christoph Hellwig
2009-11-24 18:02:23 +00:00
committed by Alex Elder
parent c355c656fe
commit 6ad112bfb5
9 changed files with 44 additions and 50 deletions

View File

@@ -277,10 +277,10 @@ xfs_read_buf(
xfs_buf_t *bp;
int error;
if (flags)
bp = xfs_buf_read_flags(target, blkno, len, flags);
else
bp = xfs_buf_read(target, blkno, len, flags);
if (!flags)
flags = XBF_LOCK | XBF_MAPPED;
bp = xfs_buf_read(target, blkno, len, flags);
if (!bp)
return XFS_ERROR(EIO);
error = XFS_BUF_GETERROR(bp);