From: Xiubo Li <xiubli@redhat.com>
To: Miaoqian Lin <linmq006@gmail.com>,
Ilya Dryomov <idryomov@gmail.com>,
Jeff Layton <jlayton@kernel.org>,
ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: Fix NULL vs IS_ERR checking in ceph_getattr
Date: Thu, 10 Nov 2022 13:44:56 +0800 [thread overview]
Message-ID: <67a1782c-9b7d-055a-5e62-456294cb4401@redhat.com> (raw)
In-Reply-To: <20221110031311.1629288-1-linmq006@gmail.com>
Hi Miaoqian,
Thanks for your patch. This has already been fixed by Dan Carpenter
weeks ago and already in the ceph-client's testing branch, please see [1]:
[1]
https://github.com/ceph/ceph-client/commit/ffc4d66a34bb5bd76d0a3f83bebf500d96a8e37c
BRs
- Xiubo
On 10/11/2022 11:13, Miaoqian Lin wrote:
> The ceph_lookup_inode() function return error pointers on error
> instead of NULL.
> Use IS_ERR() to check the return value to fix this.
>
> Fixes: aa87052dd965 ("ceph: fix incorrectly showing the .snap size for stat")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> fs/ceph/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> index 4af5e55abc15..bad9eeb6a1a5 100644
> --- a/fs/ceph/inode.c
> +++ b/fs/ceph/inode.c
> @@ -2492,7 +2492,7 @@ int ceph_getattr(struct user_namespace *mnt_userns, const struct path *path,
> struct inode *parent;
>
> parent = ceph_lookup_inode(sb, ceph_ino(inode));
> - if (!parent)
> + if (IS_ERR(parent))
> return PTR_ERR(parent);
>
> pci = ceph_inode(parent);
next prev parent reply other threads:[~2022-11-10 5:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 3:13 Miaoqian Lin
2022-11-10 5:44 ` Xiubo Li [this message]
2022-11-10 11:24 ` Ilya Dryomov
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=67a1782c-9b7d-055a-5e62-456294cb4401@redhat.com \
--to=xiubli@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®