linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] Btrfs: remove unnecessary cur_trans set before goto loop in join_transaction
@ 2012-09-24  0:47 Wang Sheng-Hui
  2013-01-09 10:48 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Sheng-Hui @ 2012-09-24  0:47 UTC (permalink / raw)
  To: linux-btrfs, trivial

In the big loop, cur_trans will be set fs_info->running_transaction
before it's used. And after kmem_cache_free it and goto loop, it will
be setup again. No need to setup it immediately after freed.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
 fs/btrfs/transaction.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 469a8b6..675d813 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -98,7 +98,6 @@ loop:
 		 * to redo the trans_no_join checks above
 		 */
 		kmem_cache_free(btrfs_transaction_cachep, cur_trans);
-		cur_trans = fs_info->running_transaction;
 		goto loop;
 	} else if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
 		spin_unlock(&fs_info->trans_lock);
-- 
1.7.1


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

* Re: [PATCH 3/4] Btrfs: remove unnecessary cur_trans set before goto loop in join_transaction
  2012-09-24  0:47 [PATCH 3/4] Btrfs: remove unnecessary cur_trans set before goto loop in join_transaction Wang Sheng-Hui
@ 2013-01-09 10:48 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2013-01-09 10:48 UTC (permalink / raw)
  To: Wang Sheng-Hui; +Cc: linux-btrfs

On Mon, 24 Sep 2012, Wang Sheng-Hui wrote:

> In the big loop, cur_trans will be set fs_info->running_transaction
> before it's used. And after kmem_cache_free it and goto loop, it will
> be setup again. No need to setup it immediately after freed.
> 
> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
> ---
>  fs/btrfs/transaction.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
> index 469a8b6..675d813 100644
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@ -98,7 +98,6 @@ loop:
>  		 * to redo the trans_no_join checks above
>  		 */
>  		kmem_cache_free(btrfs_transaction_cachep, cur_trans);
> -		cur_trans = fs_info->running_transaction;
>  		goto loop;
>  	} else if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
>  		spin_unlock(&fs_info->trans_lock);

This is Obviously Correct(TM) :-) and doesn't seem to have been picked up 
by btrfs maintainers. I am picking it up now.

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2013-01-09 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24  0:47 [PATCH 3/4] Btrfs: remove unnecessary cur_trans set before goto loop in join_transaction Wang Sheng-Hui
2013-01-09 10:48 ` Jiri Kosina

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).