transaction.c (622147fdad5425f6f572f84ce709303e5e0500b7) | transaction.c (bee9182d955227f01ff3b80c4cb6acca9bb40b11) |
---|---|
1/* 2 * Copyright (C) 2007 Oracle. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 1624 unchanged lines hidden (view full) --- 1633 struct btrfs_async_commit *ac = 1634 container_of(work, struct btrfs_async_commit, work); 1635 1636 /* 1637 * We've got freeze protection passed with the transaction. 1638 * Tell lockdep about it. 1639 */ 1640 if (ac->newtrans->type & __TRANS_FREEZABLE) | 1/* 2 * Copyright (C) 2007 Oracle. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 1624 unchanged lines hidden (view full) --- 1633 struct btrfs_async_commit *ac = 1634 container_of(work, struct btrfs_async_commit, work); 1635 1636 /* 1637 * We've got freeze protection passed with the transaction. 1638 * Tell lockdep about it. 1639 */ 1640 if (ac->newtrans->type & __TRANS_FREEZABLE) |
1641 rwsem_acquire_read( 1642 &ac->root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1], 1643 0, 1, _THIS_IP_); | 1641 __sb_writers_acquired(ac->root->fs_info->sb, SB_FREEZE_FS); |
1644 1645 current->journal_info = ac->newtrans; 1646 1647 btrfs_commit_transaction(ac->newtrans, ac->root); 1648 kfree(ac); 1649} 1650 1651int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans, --- 22 unchanged lines hidden (view full) --- 1674 1675 btrfs_end_transaction(trans, root); 1676 1677 /* 1678 * Tell lockdep we've released the freeze rwsem, since the 1679 * async commit thread will be the one to unlock it. 1680 */ 1681 if (ac->newtrans->type & __TRANS_FREEZABLE) | 1642 1643 current->journal_info = ac->newtrans; 1644 1645 btrfs_commit_transaction(ac->newtrans, ac->root); 1646 kfree(ac); 1647} 1648 1649int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans, --- 22 unchanged lines hidden (view full) --- 1672 1673 btrfs_end_transaction(trans, root); 1674 1675 /* 1676 * Tell lockdep we've released the freeze rwsem, since the 1677 * async commit thread will be the one to unlock it. 1678 */ 1679 if (ac->newtrans->type & __TRANS_FREEZABLE) |
1682 rwsem_release( 1683 &root->fs_info->sb->s_writers.lock_map[SB_FREEZE_FS-1], 1684 1, _THIS_IP_); | 1680 __sb_writers_release(root->fs_info->sb, SB_FREEZE_FS); |
1685 1686 schedule_work(&ac->work); 1687 1688 /* wait for transaction to start and unblock */ 1689 if (wait_for_unblock) 1690 wait_current_trans_commit_start_and_unblock(root, cur_trans); 1691 else 1692 wait_current_trans_commit_start(root, cur_trans); --- 552 unchanged lines hidden --- | 1681 1682 schedule_work(&ac->work); 1683 1684 /* wait for transaction to start and unblock */ 1685 if (wait_for_unblock) 1686 wait_current_trans_commit_start_and_unblock(root, cur_trans); 1687 else 1688 wait_current_trans_commit_start(root, cur_trans); --- 552 unchanged lines hidden --- |