diff options
-rw-r--r-- | fs/btrfs/transaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 57c16b46afbd..c6a872a8a468 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -1480,7 +1480,7 @@ static void do_async_commit(struct work_struct *work) | |||
1480 | * We've got freeze protection passed with the transaction. | 1480 | * We've got freeze protection passed with the transaction. |
1481 | * Tell lockdep about it. | 1481 | * Tell lockdep about it. |
1482 | */ | 1482 | */ |
1483 | if (ac->newtrans->type < TRANS_JOIN_NOLOCK) | 1483 | if (ac->newtrans->type & __TRANS_FREEZABLE) |
1484 | rwsem_acquire_read( | 1484 | rwsem_acquire_read( |
1485 | &ac->root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1], | 1485 | &ac->root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1], |
1486 | 0, 1, _THIS_IP_); | 1486 | 0, 1, _THIS_IP_); |
@@ -1521,7 +1521,7 @@ int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans, | |||
1521 | * Tell lockdep we've released the freeze rwsem, since the | 1521 | * Tell lockdep we've released the freeze rwsem, since the |
1522 | * async commit thread will be the one to unlock it. | 1522 | * async commit thread will be the one to unlock it. |
1523 | */ | 1523 | */ |
1524 | if (trans->type < TRANS_JOIN_NOLOCK) | 1524 | if (ac->newtrans->type & __TRANS_FREEZABLE) |
1525 | rwsem_release( | 1525 | rwsem_release( |
1526 | &root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1], | 1526 | &root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1], |
1527 | 1, _THIS_IP_); | 1527 | 1, _THIS_IP_); |