aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 2e71a26da22e..04689dbbcbba 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -43,7 +43,7 @@
43 43
44static kmem_zone_t *xfs_buf_zone; 44static kmem_zone_t *xfs_buf_zone;
45STATIC int xfsbufd(void *); 45STATIC int xfsbufd(void *);
46STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int); 46STATIC void xfs_buf_delwri_queue(xfs_buf_t *);
47 47
48static struct workqueue_struct *xfslogd_workqueue; 48static struct workqueue_struct *xfslogd_workqueue;
49struct workqueue_struct *xfsdatad_workqueue; 49struct workqueue_struct *xfsdatad_workqueue;
@@ -940,7 +940,7 @@ xfs_buf_unlock(
940 if ((bp->b_flags & (XBF_DELWRI|_XBF_DELWRI_Q)) == XBF_DELWRI) { 940 if ((bp->b_flags & (XBF_DELWRI|_XBF_DELWRI_Q)) == XBF_DELWRI) {
941 atomic_inc(&bp->b_hold); 941 atomic_inc(&bp->b_hold);
942 bp->b_flags |= XBF_ASYNC; 942 bp->b_flags |= XBF_ASYNC;
943 xfs_buf_delwri_queue(bp, 0); 943 xfs_buf_delwri_queue(bp);
944 } 944 }
945 945
946 XB_CLEAR_OWNER(bp); 946 XB_CLEAR_OWNER(bp);
@@ -1049,7 +1049,8 @@ xfs_bdwrite(
1049 bp->b_flags &= ~XBF_READ; 1049 bp->b_flags &= ~XBF_READ;
1050 bp->b_flags |= (XBF_DELWRI | XBF_ASYNC); 1050 bp->b_flags |= (XBF_DELWRI | XBF_ASYNC);
1051 1051
1052 xfs_buf_delwri_queue(bp, 1); 1052 xfs_buf_delwri_queue(bp);
1053 xfs_buf_unlock(bp);
1053} 1054}
1054 1055
1055/* 1056/*
@@ -1562,8 +1563,7 @@ error:
1562 */ 1563 */
1563STATIC void 1564STATIC void
1564xfs_buf_delwri_queue( 1565xfs_buf_delwri_queue(
1565 xfs_buf_t *bp, 1566 xfs_buf_t *bp)
1566 int unlock)
1567{ 1567{
1568 struct list_head *dwq = &bp->b_target->bt_delwrite_queue; 1568 struct list_head *dwq = &bp->b_target->bt_delwrite_queue;
1569 spinlock_t *dwlk = &bp->b_target->bt_delwrite_lock; 1569 spinlock_t *dwlk = &bp->b_target->bt_delwrite_lock;
@@ -1576,8 +1576,7 @@ xfs_buf_delwri_queue(
1576 /* If already in the queue, dequeue and place at tail */ 1576 /* If already in the queue, dequeue and place at tail */
1577 if (!list_empty(&bp->b_list)) { 1577 if (!list_empty(&bp->b_list)) {
1578 ASSERT(bp->b_flags & _XBF_DELWRI_Q); 1578 ASSERT(bp->b_flags & _XBF_DELWRI_Q);
1579 if (unlock) 1579 atomic_dec(&bp->b_hold);
1580 atomic_dec(&bp->b_hold);
1581 list_del(&bp->b_list); 1580 list_del(&bp->b_list);
1582 } 1581 }
1583 1582
@@ -1590,9 +1589,6 @@ xfs_buf_delwri_queue(
1590 list_add_tail(&bp->b_list, dwq); 1589 list_add_tail(&bp->b_list, dwq);
1591 bp->b_queuetime = jiffies; 1590 bp->b_queuetime = jiffies;
1592 spin_unlock(dwlk); 1591 spin_unlock(dwlk);
1593
1594 if (unlock)
1595 xfs_buf_unlock(bp);
1596} 1592}
1597 1593
1598void 1594void