mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: cgel.zte@gmail.com, mark@fasheh.com
Cc: jlbec@evilplan.org, ocfs2-devel@oss.oracle.com,
	linux-kernel@vger.kernel.org,
	Minghao Chi <chi.minghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] fs/ocfs2: remove redundant ret variable
Date: Wed, 12 Jan 2022 19:19:16 +0800	[thread overview]
Message-ID: <5c820350-3dd0-5bb5-66a4-6bedb119525f@linux.alibaba.com> (raw)
In-Reply-To: <20220112081408.667411-1-chi.minghao@zte.com.cn>

This is obviously not right as you remove the extent tree initialization.

Thanks,
Joseph

On 1/12/22 4:14 PM, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return value from ocfs2_add_clusters_in_btree() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
>  fs/ocfs2/file.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
> index fc5f780fa235..9a46dcef448c 100644
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -540,15 +540,11 @@ int ocfs2_add_inode_data(struct ocfs2_super *osb,
>  			 struct ocfs2_alloc_context *meta_ac,
>  			 enum ocfs2_alloc_restarted *reason_ret)
>  {
> -	int ret;
>  	struct ocfs2_extent_tree et;
>  
> -	ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), fe_bh);
> -	ret = ocfs2_add_clusters_in_btree(handle, &et, logical_offset,
> +	return ocfs2_add_clusters_in_btree(handle, &et, logical_offset,
>  					  clusters_to_add, mark_unwritten,
>  					  data_ac, meta_ac, reason_ret);
> -
> -	return ret;
>  }
>  
>  static int ocfs2_extend_allocation(struct inode *inode, u32 logical_start,

  reply	other threads:[~2022-01-12 11:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12  8:14 cgel.zte
2022-01-12 11:19 ` Joseph Qi [this message]
2022-01-23 14:13 ` [fs/ocfs2] 32e1a3dbeb: kernel_BUG_at_fs/ocfs2/uptodate.c kernel test robot
2022-01-24  2:34   ` Joseph Qi
  -- strict thread matches above, loose matches on Subject: below --
2022-01-04 11:23 [PATCH] fs/ocfs2: remove redundant ret variable cgel.zte
2022-01-05  2:04 ` Joseph Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c820350-3dd0-5bb5-66a4-6bedb119525f@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®