Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352924
b: refs/heads/master
c: 3b19034
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Jan 26, 2013
1 parent 711f48d commit 8523985
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: 4d559a3bcb7383f34334092af07e68fb60910684
refs/heads/master: 3b19034d4f4554e39ca244fb28962bbf2ccba046
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 @@ -548,7 +548,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 @@ -560,7 +563,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 8523985

Please sign in to comment.