All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] Btrfs: small naming cleanup in join_transaction()
@ 2012-06-19 10:30 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-06-19 10:30 UTC (permalink / raw)
  To: Chris Mason; +Cc: linux-btrfs, Josef Bacik, kernel-janitors

"root->fs_info" and "fs_info" are the same, but "fs_info" is prefered
because it is shorter and that's what is used in the rest of the
function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Also, Smatch doesn't understand that they are the same so it complains
about the locking.

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index b72b068..e5f1b15 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -100,8 +100,8 @@ loop:
 		kmem_cache_free(btrfs_transaction_cachep, cur_trans);
 		cur_trans = fs_info->running_transaction;
 		goto loop;
-	} else if (root->fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
-		spin_unlock(&root->fs_info->trans_lock);
+	} else if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
+		spin_unlock(&fs_info->trans_lock);
 		kmem_cache_free(btrfs_transaction_cachep, cur_trans);
 		return -EROFS;
 	}

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

* [patch] Btrfs: small naming cleanup in join_transaction()
@ 2012-06-19 10:30 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-06-19 10:30 UTC (permalink / raw)
  To: Chris Mason; +Cc: linux-btrfs, Josef Bacik, kernel-janitors

"root->fs_info" and "fs_info" are the same, but "fs_info" is prefered
because it is shorter and that's what is used in the rest of the
function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Also, Smatch doesn't understand that they are the same so it complains
about the locking.

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index b72b068..e5f1b15 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -100,8 +100,8 @@ loop:
 		kmem_cache_free(btrfs_transaction_cachep, cur_trans);
 		cur_trans = fs_info->running_transaction;
 		goto loop;
-	} else if (root->fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
-		spin_unlock(&root->fs_info->trans_lock);
+	} else if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
+		spin_unlock(&fs_info->trans_lock);
 		kmem_cache_free(btrfs_transaction_cachep, cur_trans);
 		return -EROFS;
 	}

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

end of thread, other threads:[~2012-06-19 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 10:30 [patch] Btrfs: small naming cleanup in join_transaction() Dan Carpenter
2012-06-19 10:30 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.