Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352942
b: refs/heads/master
c: 5337fe9
h: refs/heads/master
v: v3
  • Loading branch information
Brian Foster authored and Ben Myers committed Feb 14, 2013
1 parent 5a11ca9 commit 9bab910
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: a1e16c26660b301cc8423185924cf1b0b16ea92b
refs/heads/master: 5337fe9b108d602c483fe9d62ffef9227acf3a74
12 changes: 11 additions & 1 deletion trunk/fs/xfs/xfs_buf_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,18 @@ xfs_buf_item_push(

if (xfs_buf_ispinned(bp))
return XFS_ITEM_PINNED;
if (!xfs_buf_trylock(bp))
if (!xfs_buf_trylock(bp)) {
/*
* If we have just raced with a buffer being pinned and it has
* been marked stale, we could end up stalling until someone else
* issues a log force to unpin the stale buffer. Check for the
* race condition here so xfsaild recognizes the buffer is pinned
* and queues a log force to move it along.
*/
if (xfs_buf_ispinned(bp))
return XFS_ITEM_PINNED;
return XFS_ITEM_LOCKED;
}

ASSERT(!(bip->bli_flags & XFS_BLI_STALE));

Expand Down

0 comments on commit 9bab910

Please sign in to comment.