linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] jbd2: jbd2_get_transaction does not need to return a value
       [not found] <20190226160728.38587-1-fishland@aliyun.com>
@ 2019-02-26 16:35 ` Jan Kara
  2019-03-01  5:39   ` Theodore Y. Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2019-02-26 16:35 UTC (permalink / raw)
  To: Liu Song; +Cc: tytso, jack, linux-ext4, linux-kernel, liu.song11

On Wed 27-02-19 00:07:27, Liu Song wrote:
> In jbd2_get_transaction, a new transaction is initialized,
> and set to the j_running_transaction. No need for a return
> value, so remove it.
> Also, adjust some comments to match the actual operation
> of this function.
> 
> Signed-off-by: Liu Song <liu.song11@zte.com.cn>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/jbd2/transaction.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
> index cc35537232f2..79a028a7a579 100644
> --- a/fs/jbd2/transaction.c
> +++ b/fs/jbd2/transaction.c
> @@ -63,7 +63,7 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
>  /*
>   * jbd2_get_transaction: obtain a new transaction_t object.
>   *
> - * Simply allocate and initialise a new transaction.  Create it in
> + * Simply initialise a new transaction. Initialize it in
>   * RUNNING state and add it to the current journal (which should not
>   * have an existing running transaction: we only make a new transaction
>   * once we have started to commit the old one).
> @@ -75,8 +75,8 @@ void jbd2_journal_free_transaction(transaction_t *transaction)
>   *
>   */
>  
> -static transaction_t *
> -jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
> +static void jbd2_get_transaction(journal_t *journal,
> +				transaction_t *transaction)
>  {
>  	transaction->t_journal = journal;
>  	transaction->t_state = T_RUNNING;
> @@ -100,8 +100,6 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
>  	transaction->t_max_wait = 0;
>  	transaction->t_start = jiffies;
>  	transaction->t_requested = 0;
> -
> -	return transaction;
>  }
>  
>  /*
> -- 
> 2.19.1
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: [PATCH] jbd2: jbd2_get_transaction does not need to return a value
  2019-02-26 16:35 ` [PATCH] jbd2: jbd2_get_transaction does not need to return a value Jan Kara
@ 2019-03-01  5:39   ` Theodore Y. Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Y. Ts'o @ 2019-03-01  5:39 UTC (permalink / raw)
  To: Jan Kara; +Cc: Liu Song, jack, linux-ext4, linux-kernel, liu.song11

On Tue, Feb 26, 2019 at 05:35:04PM +0100, Jan Kara wrote:
> On Wed 27-02-19 00:07:27, Liu Song wrote:
> > In jbd2_get_transaction, a new transaction is initialized,
> > and set to the j_running_transaction. No need for a return
> > value, so remove it.
> > Also, adjust some comments to match the actual operation
> > of this function.
> > 
> > Signed-off-by: Liu Song <liu.song11@zte.com.cn>
> 
> Looks good. You can add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>

Thanks, applied.

						- Ted

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

end of thread, other threads:[~2019-03-01  5:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190226160728.38587-1-fishland@aliyun.com>
2019-02-26 16:35 ` [PATCH] jbd2: jbd2_get_transaction does not need to return a value Jan Kara
2019-03-01  5:39   ` Theodore Y. Ts'o

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