aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-10 12:52:47 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:10 -0400
commitaf5c4bee499eb68bc36ca046030394d82d0e3669 (patch)
tree4d015bdd36d9c424e04c8aaf8050dccb79cd7c31 /fs/xfs/xfs_buf.c
parentc867cb61641751fd3d86350232d64ae2a10137d4 (diff)
xfs: remove buffers from the delwri list in xfs_buf_stale
For each call to xfs_buf_stale we call xfs_buf_delwri_dequeue either directly before or after it, or are guaranteed by the surrounding conditionals that we are never called on delwri buffers. Simply this situation by moving the call to xfs_buf_delwri_dequeue into xfs_buf_stale. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index f88eab9e8144..3df7d0a2b245 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -151,6 +151,7 @@ xfs_buf_stale(
151 struct xfs_buf *bp) 151 struct xfs_buf *bp)
152{ 152{
153 bp->b_flags |= XBF_STALE; 153 bp->b_flags |= XBF_STALE;
154 xfs_buf_delwri_dequeue(bp);
154 atomic_set(&(bp)->b_lru_ref, 0); 155 atomic_set(&(bp)->b_lru_ref, 0);
155 if (!list_empty(&bp->b_lru)) { 156 if (!list_empty(&bp->b_lru)) {
156 struct xfs_buftarg *btp = bp->b_target; 157 struct xfs_buftarg *btp = bp->b_target;
@@ -1059,7 +1060,6 @@ xfs_bioerror(
1059 * We're calling xfs_buf_ioend, so delete XBF_DONE flag. 1060 * We're calling xfs_buf_ioend, so delete XBF_DONE flag.
1060 */ 1061 */
1061 XFS_BUF_UNREAD(bp); 1062 XFS_BUF_UNREAD(bp);
1062 xfs_buf_delwri_dequeue(bp);
1063 XFS_BUF_UNDONE(bp); 1063 XFS_BUF_UNDONE(bp);
1064 xfs_buf_stale(bp); 1064 xfs_buf_stale(bp);
1065 1065
@@ -1088,7 +1088,6 @@ xfs_bioerror_relse(
1088 * change that interface. 1088 * change that interface.
1089 */ 1089 */
1090 XFS_BUF_UNREAD(bp); 1090 XFS_BUF_UNREAD(bp);
1091 xfs_buf_delwri_dequeue(bp);
1092 XFS_BUF_DONE(bp); 1091 XFS_BUF_DONE(bp);
1093 xfs_buf_stale(bp); 1092 xfs_buf_stale(bp);
1094 bp->b_iodone = NULL; 1093 bp->b_iodone = NULL;