Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349350
b: refs/heads/master
c: 9f87832
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Jan 28, 2013
1 parent b5f5f23 commit 11fba10
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 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: f2a459565b02b60408f3f2e5ca992a031319712b
refs/heads/master: 9f87832a82923943aaab38b8d53658af134bbfa4
2 changes: 2 additions & 0 deletions trunk/fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,8 @@ xfs_wait_buftarg(
while (!list_empty(&btp->bt_lru)) {
bp = list_first_entry(&btp->bt_lru, struct xfs_buf, b_lru);
if (atomic_read(&bp->b_hold) > 1) {
trace_xfs_buf_wait_buftarg(bp, _RET_IP_);
list_move_tail(&bp->b_lru, &btp->bt_lru);
spin_unlock(&btp->bt_lru_lock);
delay(100);
goto restart;
Expand Down
12 changes: 10 additions & 2 deletions trunk/fs/xfs/xfs_buf_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,10 @@ xfs_buf_item_unlock(

/*
* If the buf item isn't tracking any data, free it, otherwise drop the
* reference we hold to it.
* reference we hold to it. If we are aborting the transaction, this may
* be the only reference to the buf item, so we free it anyway
* regardless of whether it is dirty or not. A dirty abort implies a
* shutdown, anyway.
*/
clean = 1;
for (i = 0; i < bip->bli_format_count; i++) {
Expand All @@ -664,7 +667,12 @@ xfs_buf_item_unlock(
}
if (clean)
xfs_buf_item_relse(bp);
else
else if (aborted) {
if (atomic_dec_and_test(&bip->bli_refcount)) {
ASSERT(XFS_FORCED_SHUTDOWN(lip->li_mountp));
xfs_buf_item_relse(bp);
}
} else
atomic_dec(&bip->bli_refcount);

if (!hold)
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/xfs/xfs_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ DEFINE_BUF_EVENT(xfs_buf_item_relse);
DEFINE_BUF_EVENT(xfs_buf_item_iodone);
DEFINE_BUF_EVENT(xfs_buf_item_iodone_async);
DEFINE_BUF_EVENT(xfs_buf_error_relse);
DEFINE_BUF_EVENT(xfs_buf_wait_buftarg);
DEFINE_BUF_EVENT(xfs_trans_read_buf_io);
DEFINE_BUF_EVENT(xfs_trans_read_buf_shut);

Expand Down

0 comments on commit 11fba10

Please sign in to comment.