diff options
author | Christoph Hellwig <hch@infradead.org> | 2009-11-24 13:02:23 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2009-12-11 16:11:21 -0500 |
commit | 6ad112bfb5af537e9e3103c807748bb4a99bbd9e (patch) | |
tree | 783d7ea24d916914914287f696c1a957e495bd59 /fs/xfs/linux-2.6/xfs_buf.h | |
parent | c355c656fede21f6e967816a603905f0ad6a7311 (diff) |
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>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 9b4d666ad31f..5f07dd91c5fa 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -186,15 +186,10 @@ extern xfs_buf_t *_xfs_buf_find(xfs_buftarg_t *, xfs_off_t, size_t, | |||
186 | #define xfs_incore(buftarg,blkno,len,lockit) \ | 186 | #define xfs_incore(buftarg,blkno,len,lockit) \ |
187 | _xfs_buf_find(buftarg, blkno ,len, lockit, NULL) | 187 | _xfs_buf_find(buftarg, blkno ,len, lockit, NULL) |
188 | 188 | ||
189 | extern xfs_buf_t *xfs_buf_get_flags(xfs_buftarg_t *, xfs_off_t, size_t, | 189 | extern xfs_buf_t *xfs_buf_get(xfs_buftarg_t *, xfs_off_t, size_t, |
190 | xfs_buf_flags_t); | 190 | xfs_buf_flags_t); |
191 | #define xfs_buf_get(target, blkno, len, flags) \ | 191 | extern xfs_buf_t *xfs_buf_read(xfs_buftarg_t *, xfs_off_t, size_t, |
192 | xfs_buf_get_flags((target), (blkno), (len), XBF_LOCK | XBF_MAPPED) | ||
193 | |||
194 | extern xfs_buf_t *xfs_buf_read_flags(xfs_buftarg_t *, xfs_off_t, size_t, | ||
195 | xfs_buf_flags_t); | 192 | xfs_buf_flags_t); |
196 | #define xfs_buf_read(target, blkno, len, flags) \ | ||
197 | xfs_buf_read_flags((target), (blkno), (len), XBF_LOCK | XBF_MAPPED) | ||
198 | 193 | ||
199 | extern xfs_buf_t *xfs_buf_get_empty(size_t, xfs_buftarg_t *); | 194 | extern xfs_buf_t *xfs_buf_get_empty(size_t, xfs_buftarg_t *); |
200 | extern xfs_buf_t *xfs_buf_get_noaddr(size_t, xfs_buftarg_t *); | 195 | extern xfs_buf_t *xfs_buf_get_noaddr(size_t, xfs_buftarg_t *); |