aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2013-12-17 03:03:52 -0500
committerBen Myers <bpm@sgi.com>2013-12-17 10:28:43 -0500
commit83a0adc3f93aae4ab9c59113e3145c7bdb2b4a8c (patch)
treef7a06f3cba2a6607df973a10517f6c1a60509eba /fs/xfs/xfs_bmap_util.c
parent6e708bcf6583f663da9fe7bc5292cc62f0a8410d (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_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 5887e41c0323..1394106ed22d 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1187,7 +1187,12 @@ xfs_zero_remaining_bytes(
1187 XFS_BUF_UNWRITE(bp); 1187 XFS_BUF_UNWRITE(bp);
1188 XFS_BUF_READ(bp); 1188 XFS_BUF_READ(bp);
1189 XFS_BUF_SET_ADDR(bp, xfs_fsb_to_db(ip, imap.br_startblock)); 1189 XFS_BUF_SET_ADDR(bp, xfs_fsb_to_db(ip, imap.br_startblock));
1190 xfsbdstrat(mp, bp); 1190
1191 if (XFS_FORCED_SHUTDOWN(mp)) {
1192 error = XFS_ERROR(EIO);
1193 break;
1194 }
1195 xfs_buf_iorequest(bp);
1191 error = xfs_buf_iowait(bp); 1196 error = xfs_buf_iowait(bp);
1192 if (error) { 1197 if (error) {
1193 xfs_buf_ioerror_alert(bp, 1198 xfs_buf_ioerror_alert(bp,
@@ -1200,7 +1205,12 @@ xfs_zero_remaining_bytes(
1200 XFS_BUF_UNDONE(bp); 1205 XFS_BUF_UNDONE(bp);
1201 XFS_BUF_UNREAD(bp); 1206 XFS_BUF_UNREAD(bp);
1202 XFS_BUF_WRITE(bp); 1207 XFS_BUF_WRITE(bp);
1203 xfsbdstrat(mp, bp); 1208
1209 if (XFS_FORCED_SHUTDOWN(mp)) {
1210 error = XFS_ERROR(EIO);
1211 break;
1212 }
1213 xfs_buf_iorequest(bp);
1204 error = xfs_buf_iowait(bp); 1214 error = xfs_buf_iowait(bp);
1205 if (error) { 1215 if (error) {
1206 xfs_buf_ioerror_alert(bp, 1216 xfs_buf_ioerror_alert(bp,