diff options
author | Christoph Hellwig <hch@infradead.org> | 2013-12-17 03:03:52 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-12-17 10:28:43 -0500 |
commit | 83a0adc3f93aae4ab9c59113e3145c7bdb2b4a8c (patch) | |
tree | f7a06f3cba2a6607df973a10517f6c1a60509eba /fs/xfs/xfs_buf.h | |
parent | 6e708bcf6583f663da9fe7bc5292cc62f0a8410d (diff) |
xfs: remove xfsbdstrat error
The xfsbdstrat helper is a small but useless wrapper for xfs_buf_iorequest that
handles the case of a shut down filesystem. Most of the users have private,
uncached buffers that can just be freed in this case, but the complex error
handling in xfs_bioerror_relse messes up the case when it's called without
a locked buffer.
Remove xfsbdstrat and opencode the error handling in the callers. All but
one can simply return an error and don't need to deal with buffer state,
and the one caller that cares about the buffer state could do with a major
cleanup as well, but we'll defer that to later.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_buf.h')
-rw-r--r-- | fs/xfs/xfs_buf.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index e65683361017..7e41b08017f7 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h | |||
@@ -269,9 +269,6 @@ extern void xfs_buf_unlock(xfs_buf_t *); | |||
269 | 269 | ||
270 | /* Buffer Read and Write Routines */ | 270 | /* Buffer Read and Write Routines */ |
271 | extern int xfs_bwrite(struct xfs_buf *bp); | 271 | extern int xfs_bwrite(struct xfs_buf *bp); |
272 | |||
273 | extern void xfsbdstrat(struct xfs_mount *, struct xfs_buf *); | ||
274 | |||
275 | extern void xfs_buf_ioend(xfs_buf_t *, int); | 272 | extern void xfs_buf_ioend(xfs_buf_t *, int); |
276 | extern void xfs_buf_ioerror(xfs_buf_t *, int); | 273 | extern void xfs_buf_ioerror(xfs_buf_t *, int); |
277 | extern void xfs_buf_ioerror_alert(struct xfs_buf *, const char *func); | 274 | extern void xfs_buf_ioerror_alert(struct xfs_buf *, const char *func); |
@@ -282,6 +279,8 @@ extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, void *, | |||
282 | #define xfs_buf_zero(bp, off, len) \ | 279 | #define xfs_buf_zero(bp, off, len) \ |
283 | xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO) | 280 | xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO) |
284 | 281 | ||
282 | extern int xfs_bioerror_relse(struct xfs_buf *); | ||
283 | |||
285 | static inline int xfs_buf_geterror(xfs_buf_t *bp) | 284 | static inline int xfs_buf_geterror(xfs_buf_t *bp) |
286 | { | 285 | { |
287 | return bp ? bp->b_error : ENOMEM; | 286 | return bp ? bp->b_error : ENOMEM; |