Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269867
b: refs/heads/master
c: 527cfdf
h: refs/heads/master
i:
  269865: 623ea96
  269863: b4bf54c
v: v3
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Oct 12, 2011
1 parent fa093b9 commit 801f3c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 375ec69d2ef6e0797f19f5823e36e249765c3d41
refs/heads/master: 527cfdf19dd538a5a9e46b9bed0f30a38c28438d
16 changes: 6 additions & 10 deletions trunk/fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

static kmem_zone_t *xfs_buf_zone;
STATIC int xfsbufd(void *);
STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int);
STATIC void xfs_buf_delwri_queue(xfs_buf_t *);

static struct workqueue_struct *xfslogd_workqueue;
struct workqueue_struct *xfsdatad_workqueue;
Expand Down Expand Up @@ -940,7 +940,7 @@ xfs_buf_unlock(
if ((bp->b_flags & (XBF_DELWRI|_XBF_DELWRI_Q)) == XBF_DELWRI) {
atomic_inc(&bp->b_hold);
bp->b_flags |= XBF_ASYNC;
xfs_buf_delwri_queue(bp, 0);
xfs_buf_delwri_queue(bp);
}

XB_CLEAR_OWNER(bp);
Expand Down Expand Up @@ -1049,7 +1049,8 @@ xfs_bdwrite(
bp->b_flags &= ~XBF_READ;
bp->b_flags |= (XBF_DELWRI | XBF_ASYNC);

xfs_buf_delwri_queue(bp, 1);
xfs_buf_delwri_queue(bp);
xfs_buf_unlock(bp);
}

/*
Expand Down Expand Up @@ -1562,8 +1563,7 @@ xfs_alloc_buftarg(
*/
STATIC void
xfs_buf_delwri_queue(
xfs_buf_t *bp,
int unlock)
xfs_buf_t *bp)
{
struct list_head *dwq = &bp->b_target->bt_delwrite_queue;
spinlock_t *dwlk = &bp->b_target->bt_delwrite_lock;
Expand All @@ -1576,8 +1576,7 @@ xfs_buf_delwri_queue(
/* If already in the queue, dequeue and place at tail */
if (!list_empty(&bp->b_list)) {
ASSERT(bp->b_flags & _XBF_DELWRI_Q);
if (unlock)
atomic_dec(&bp->b_hold);
atomic_dec(&bp->b_hold);
list_del(&bp->b_list);
}

Expand All @@ -1590,9 +1589,6 @@ xfs_buf_delwri_queue(
list_add_tail(&bp->b_list, dwq);
bp->b_queuetime = jiffies;
spin_unlock(dwlk);

if (unlock)
xfs_buf_unlock(bp);
}

void
Expand Down

0 comments on commit 801f3c7

Please sign in to comment.