diff options
Diffstat (limited to 'fs/xfs/xfs_buf_item.c')
| -rw-r--r-- | fs/xfs/xfs_buf_item.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 98c6f73b675..6f8c21ce0d6 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
| @@ -427,13 +427,15 @@ xfs_buf_item_unpin( | |||
| 427 | 427 | ||
| 428 | if (remove) { | 428 | if (remove) { |
| 429 | /* | 429 | /* |
| 430 | * We have to remove the log item from the transaction | 430 | * If we are in a transaction context, we have to |
| 431 | * as we are about to release our reference to the | 431 | * remove the log item from the transaction as we are |
| 432 | * buffer. If we don't, the unlock that occurs later | 432 | * about to release our reference to the buffer. If we |
| 433 | * in xfs_trans_uncommit() will ry to reference the | 433 | * don't, the unlock that occurs later in |
| 434 | * xfs_trans_uncommit() will try to reference the | ||
| 434 | * buffer which we no longer have a hold on. | 435 | * buffer which we no longer have a hold on. |
| 435 | */ | 436 | */ |
| 436 | xfs_trans_del_item(lip); | 437 | if (lip->li_desc) |
| 438 | xfs_trans_del_item(lip); | ||
| 437 | 439 | ||
| 438 | /* | 440 | /* |
| 439 | * Since the transaction no longer refers to the buffer, | 441 | * Since the transaction no longer refers to the buffer, |
