diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-07-02 06:00:04 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-07-13 13:50:42 -0400 |
commit | 08023d6dbe840dc4271805a9ea376fcbdee9f744 (patch) | |
tree | 32349d435ec6ff60aed1aea7e17f10fd27242b2b /fs/xfs/xfs_buf.c | |
parent | eb71a12e411fe065f8663e12a8d81d561f9502ee (diff) |
xfs: prevent recursion in xfs_buf_iorequest
If the b_iodone handler is run in calling context in xfs_buf_iorequest we
can run into a recursion where xfs_buf_iodone_callbacks keeps calling back
into xfs_buf_iorequest because an I/O error happened, which keeps calling
back into xfs_buf_iorequest. This chain will usually not take long
because the filesystem gets shut down because of log I/O errors, but even
over a short time it can cause stack overflows if run on the same context.
As a short term workaround make sure we always call the iodone handler in
workqueue context.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 39c5d7622dec..d1edfa1a8112 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -1355,7 +1355,7 @@ xfs_buf_iorequest( | |||
1355 | */ | 1355 | */ |
1356 | atomic_set(&bp->b_io_remaining, 1); | 1356 | atomic_set(&bp->b_io_remaining, 1); |
1357 | _xfs_buf_ioapply(bp); | 1357 | _xfs_buf_ioapply(bp); |
1358 | _xfs_buf_ioend(bp, 0); | 1358 | _xfs_buf_ioend(bp, 1); |
1359 | 1359 | ||
1360 | xfs_buf_rele(bp); | 1360 | xfs_buf_rele(bp); |
1361 | } | 1361 | } |