From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Ding Xiang <dingxiang@cmss.chinamobile.com>,
mark@fasheh.com, jlbec@evilplan.org,
Andrew Morton <akpm@linux-foundation.org>
Cc: ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ocfs2: Fix passing zero to 'PTR_ERR' warning
Date: Tue, 10 Sep 2019 14:45:03 +0800 [thread overview]
Message-ID: <1dee278b-6c96-eec2-ce76-fe6e07c6e20f@linux.alibaba.com> (raw)
In-Reply-To: <1568023466-1486-1-git-send-email-dingxiang@cmss.chinamobile.com>
On 19/9/9 18:04, Ding Xiang wrote:
> Fix a static code checker warning:
> fs/ocfs2/acl.c:331
> ocfs2_acl_chmod() warn: passing zero to 'PTR_ERR'
>
> Fixes: 5ee0fbd50fd ("ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang")
> Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/acl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
> index 3e7da39..bb981ec 100644
> --- a/fs/ocfs2/acl.c
> +++ b/fs/ocfs2/acl.c
> @@ -327,8 +327,8 @@ int ocfs2_acl_chmod(struct inode *inode, struct buffer_head *bh)
> down_read(&OCFS2_I(inode)->ip_xattr_sem);
> acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, bh);
> up_read(&OCFS2_I(inode)->ip_xattr_sem);
> - if (IS_ERR(acl) || !acl)
> - return PTR_ERR(acl);
> + if (IS_ERR_OR_NULL(acl))
> + return PTR_ERR_OR_ZERO(acl);
> ret = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
> if (ret)
> return ret;
>
prev parent reply other threads:[~2019-09-10 6:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 10:04 Ding Xiang
2019-09-10 6:45 ` Joseph Qi [this message]
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=1dee278b-6c96-eec2-ce76-fe6e07c6e20f@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=dingxiang@cmss.chinamobile.com \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@oss.oracle.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
Powered by JetHome