Blob Blame History Raw
From: Filipe Manana <fdmanana@suse.com>
Date: Mon, 11 Mar 2019 13:10:56 +0000
Git-commit: 3b1da515c64e18bdd6a13348313f1168396b3722
Patch-mainline: 5.2
References: bsc#1171761
Subject: [PATCH] Btrfs: remove no longer used 'sync' member from transaction
 handle

Commit db2462a6ad3d ("btrfs: don't run delayed refs in the end transaction
logic") removed its last use, so now it does absolutely nothing, therefore
remove it.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/extent-tree.c | 6 ------
 fs/btrfs/file.c        | 1 -
 fs/btrfs/transaction.h | 1 -
 3 files changed, 8 deletions(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 06f0ce0..316c5c7 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3019,12 +3019,6 @@ static void delayed_ref_async_start(struct btrfs_work *work)
 		goto done;
 	}
 
-	/*
-	 * trans->sync means that when we call end_transaction, we won't
-	 * wait on delayed refs
-	 */
-	trans->sync = true;
-
 	/* Don't bother flushing if we got into a different transaction */
 	if (trans->transid > async->transid)
 		goto end;
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 683b48d..c16c518 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2160,7 +2160,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
 		inode_unlock(inode);
 		goto out;
 	}
-	trans->sync = true;
 
 	ret = btrfs_log_dentry_safe(trans, root, dentry, start, end, &ctx);
 	if (ret < 0) {
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index 63f1dc7..08b12df 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -122,7 +122,6 @@ struct btrfs_trans_handle {
 	bool allocating_chunk;
 	bool can_flush_pending_bgs;
 	bool reloc_reserved;
-	bool sync;
 	bool dirty;
 	unsigned int type;
 	struct btrfs_root *root;
-- 
2.16.4