mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
To: "Darrick J. Wong" <djwong@kernel.org>,
	<linux-xfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: linfeilong <linfeilong@huawei.com>, wuguanghao <wuguanghao3@huawei.com>
Subject: Re: [PATCH] xfs: donot need to check return value of xlog_kvmalloc()
Date: Sat, 27 Aug 2022 11:11:44 +0800	[thread overview]
Message-ID: <c90c6f86-dc0f-07bd-2abe-77d31716ee91@huawei.com> (raw)
In-Reply-To: <514e5e4b-e7c8-365f-8459-75974c067993@huawei.com>

friendly ping..

On 2022/8/22 19:46, Zhiqiang Liu wrote:
> In xfs_attri_log_nameval_alloc(), xlog_kvmalloc() is called
> to alloc memory, which will always return
> successfully, so we donot need to check return value.
>
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> ---
>  fs/xfs/xfs_attr_item.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c
> index 5077a7ad5646..667e151a2bca 100644
> --- a/fs/xfs/xfs_attr_item.c
> +++ b/fs/xfs/xfs_attr_item.c
> @@ -86,8 +86,6 @@ xfs_attri_log_nameval_alloc(
>  	 */
>  	nv = xlog_kvmalloc(sizeof(struct xfs_attri_log_nameval) +
>  					name_len + value_len);
> -	if (!nv)
> -		return nv;
>
>  	nv->name.i_addr = nv + 1;
>  	nv->name.i_len = name_len;


  reply	other threads:[~2022-08-27  3:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 11:46 Zhiqiang Liu
2022-08-27  3:11 ` Zhiqiang Liu [this message]
2022-08-29 16:06 ` Eric Sandeen
2022-08-31  9:48   ` Zhiqiang Liu

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=c90c6f86-dc0f-07bd-2abe-77d31716ee91@huawei.com \
    --to=liuzhiqiang26@huawei.com \
    --cc=djwong@kernel.org \
    --cc=linfeilong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=wuguanghao3@huawei.com \
    /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®