linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] btrfs: use fs_info directly
@ 2016-03-24 10:48 Anand Jain
  2016-03-24 10:48 ` [PATCH 2/3] btrfs: keep sysfs target add in the last Anand Jain
  2016-03-24 10:48 ` [PATCH 3/3] btrfs: refactor btrfs_dev_replace_start for reuse Anand Jain
  0 siblings, 2 replies; 6+ messages in thread
From: Anand Jain @ 2016-03-24 10:48 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba

Local variable fs_info, contains root->fs_info, use it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/dev-replace.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index a1d6652e0c47..d38cad37ba27 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -375,7 +375,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
 	WARN_ON(!tgt_device);
 	dev_replace->tgtdev = tgt_device;
 
-	btrfs_info_in_rcu(root->fs_info,
+	btrfs_info_in_rcu(fs_info,
 		      "dev_replace from %s (devid %llu) to %s started",
 		      src_device->missing ? "<missing disk>" :
 		        rcu_str_deref(src_device->name),
@@ -399,9 +399,9 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
 
 	ret = btrfs_sysfs_add_device_link(tgt_device->fs_devices, tgt_device);
 	if (ret)
-		btrfs_err(root->fs_info, "kobj add dev failed %d\n", ret);
+		btrfs_err(fs_info, "kobj add dev failed %d\n", ret);
 
-	btrfs_wait_ordered_roots(root->fs_info, -1);
+	btrfs_wait_ordered_roots(fs_info, -1);
 
 	/* force writing the updated state information to disk */
 	trans = btrfs_start_transaction(root, 0);
@@ -419,7 +419,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
 			      btrfs_device_get_total_bytes(src_device),
 			      &dev_replace->scrub_progress, 0, 1);
 
-	ret = btrfs_dev_replace_finishing(root->fs_info, ret);
+	ret = btrfs_dev_replace_finishing(fs_info, ret);
 	/* don't warn if EINPROGRESS, someone else might be running scrub */
 	if (ret == -EINPROGRESS) {
 		args->result = BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS;
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-01 20:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-24 10:48 [PATCH 1/3] btrfs: use fs_info directly Anand Jain
2016-03-24 10:48 ` [PATCH 2/3] btrfs: keep sysfs target add in the last Anand Jain
2016-04-25 16:23   ` David Sterba
2016-05-01 20:57     ` Anand Jain
2016-03-24 10:48 ` [PATCH 3/3] btrfs: refactor btrfs_dev_replace_start for reuse Anand Jain
2016-04-25 16:32   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).