@@ -551,7 +551,6 @@ int __pure btrfs_is_empty_uuid(u8 *uuid)
551
551
static noinline int create_subvol (struct inode * dir ,
552
552
struct dentry * dentry ,
553
553
const char * name , int namelen ,
554
- u64 * async_transid ,
555
554
struct btrfs_qgroup_inherit * inherit )
556
555
{
557
556
struct btrfs_fs_info * fs_info = btrfs_sb (dir -> i_sb );
@@ -723,14 +722,7 @@ static noinline int create_subvol(struct inode *dir,
723
722
trans -> bytes_reserved = 0 ;
724
723
btrfs_subvolume_release_metadata (fs_info , & block_rsv );
725
724
726
- if (async_transid ) {
727
- * async_transid = trans -> transid ;
728
- err = btrfs_commit_transaction_async (trans , 1 );
729
- if (err )
730
- err = btrfs_commit_transaction (trans );
731
- } else {
732
- err = btrfs_commit_transaction (trans );
733
- }
725
+ err = btrfs_commit_transaction (trans );
734
726
if (err && !ret )
735
727
ret = err ;
736
728
@@ -748,8 +740,7 @@ static noinline int create_subvol(struct inode *dir,
748
740
}
749
741
750
742
static int create_snapshot (struct btrfs_root * root , struct inode * dir ,
751
- struct dentry * dentry ,
752
- u64 * async_transid , bool readonly ,
743
+ struct dentry * dentry , bool readonly ,
753
744
struct btrfs_qgroup_inherit * inherit )
754
745
{
755
746
struct btrfs_fs_info * fs_info = btrfs_sb (dir -> i_sb );
@@ -833,14 +824,8 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir,
833
824
list_add (& pending_snapshot -> list ,
834
825
& trans -> transaction -> pending_snapshots );
835
826
spin_unlock (& fs_info -> trans_lock );
836
- if (async_transid ) {
837
- * async_transid = trans -> transid ;
838
- ret = btrfs_commit_transaction_async (trans , 1 );
839
- if (ret )
840
- ret = btrfs_commit_transaction (trans );
841
- } else {
842
- ret = btrfs_commit_transaction (trans );
843
- }
827
+
828
+ ret = btrfs_commit_transaction (trans );
844
829
if (ret )
845
830
goto fail ;
846
831
@@ -946,7 +931,7 @@ static inline int btrfs_may_create(struct inode *dir, struct dentry *child)
946
931
static noinline int btrfs_mksubvol (const struct path * parent ,
947
932
const char * name , int namelen ,
948
933
struct btrfs_root * snap_src ,
949
- u64 * async_transid , bool readonly ,
934
+ bool readonly ,
950
935
struct btrfs_qgroup_inherit * inherit )
951
936
{
952
937
struct inode * dir = d_inode (parent -> dentry );
@@ -982,13 +967,11 @@ static noinline int btrfs_mksubvol(const struct path *parent,
982
967
if (btrfs_root_refs (& BTRFS_I (dir )-> root -> root_item ) == 0 )
983
968
goto out_up_read ;
984
969
985
- if (snap_src ) {
986
- error = create_snapshot (snap_src , dir , dentry ,
987
- async_transid , readonly , inherit );
988
- } else {
989
- error = create_subvol (dir , dentry , name , namelen ,
990
- async_transid , inherit );
991
- }
970
+ if (snap_src )
971
+ error = create_snapshot (snap_src , dir , dentry , readonly , inherit );
972
+ else
973
+ error = create_subvol (dir , dentry , name , namelen , inherit );
974
+
992
975
if (!error )
993
976
fsnotify_mkdir (dir , dentry );
994
977
out_up_read :
0 commit comments