From: Gao Xiang <gaoxiang25@huawei.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Gao Xiang <xiang@kernel.org>,
linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH -next] erofs: fix return value check in erofs_read_superblock()
Date: Wed, 18 Sep 2019 08:33:08 +0000 [thread overview]
Message-ID: <20190918083308.GA30134@architecture4> (raw)
In-Reply-To: <20190918083033.47780-1-weiyongjun1@huawei.com>
Hi Yongjun,
On Wed, Sep 18, 2019 at 08:30:33AM +0000, Wei Yongjun wrote:
> In case of error, the function read_mapping_page() returns
> ERR_PTR() not NULL. The NULL test in the return value check
> should be replaced with IS_ERR().
>
> Fixes: fe7c2423570d ("erofs: use read_mapping_page instead of sb_bread")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Right... That is my mistake on recent killing bh
transformation...
I have no idea this patch could be merged for -rc1
since I don't know Greg could still accept patches
or freezed...
Since it's an error handling path and trivial, if
it's some late, could I submit this later after
erofs is merged into mainline (if it's ok) for -rc1?
(or maybe -rc2?)
Thanks,
Gao Xiang
> ---
> fs/erofs/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index caf9a95173b0..0e369494f2f2 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -105,9 +105,9 @@ static int erofs_read_superblock(struct super_block *sb)
> int ret;
>
> page = read_mapping_page(sb->s_bdev->bd_inode->i_mapping, 0, NULL);
> - if (!page) {
> + if (IS_ERR(page)) {
> erofs_err(sb, "cannot read erofs superblock");
> - return -EIO;
> + return PTR_ERR(page);
> }
>
> sbi = EROFS_SB(sb);
>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Gao Xiang <gaoxiang25@huawei.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Gao Xiang <xiang@kernel.org>,
linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH -next] erofs: fix return value check in erofs_read_superblock()
Date: Wed, 18 Sep 2019 16:33:08 +0800 [thread overview]
Message-ID: <20190918083308.GA30134@architecture4> (raw)
In-Reply-To: <20190918083033.47780-1-weiyongjun1@huawei.com>
Hi Yongjun,
On Wed, Sep 18, 2019 at 08:30:33AM +0000, Wei Yongjun wrote:
> In case of error, the function read_mapping_page() returns
> ERR_PTR() not NULL. The NULL test in the return value check
> should be replaced with IS_ERR().
>
> Fixes: fe7c2423570d ("erofs: use read_mapping_page instead of sb_bread")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Right... That is my mistake on recent killing bh
transformation...
I have no idea this patch could be merged for -rc1
since I don't know Greg could still accept patches
or freezed...
Since it's an error handling path and trivial, if
it's some late, could I submit this later after
erofs is merged into mainline (if it's ok) for -rc1?
(or maybe -rc2?)
Thanks,
Gao Xiang
> ---
> fs/erofs/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index caf9a95173b0..0e369494f2f2 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -105,9 +105,9 @@ static int erofs_read_superblock(struct super_block *sb)
> int ret;
>
> page = read_mapping_page(sb->s_bdev->bd_inode->i_mapping, 0, NULL);
> - if (!page) {
> + if (IS_ERR(page)) {
> erofs_err(sb, "cannot read erofs superblock");
> - return -EIO;
> + return PTR_ERR(page);
> }
>
> sbi = EROFS_SB(sb);
>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Gao Xiang <gaoxiang25@huawei.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Gao Xiang <xiang@kernel.org>, Chao Yu <chao@kernel.org>,
Chao Yu <yuchao0@huawei.com>, <linux-erofs@lists.ozlabs.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH -next] erofs: fix return value check in erofs_read_superblock()
Date: Wed, 18 Sep 2019 16:33:08 +0800 [thread overview]
Message-ID: <20190918083308.GA30134@architecture4> (raw)
In-Reply-To: <20190918083033.47780-1-weiyongjun1@huawei.com>
Hi Yongjun,
On Wed, Sep 18, 2019 at 08:30:33AM +0000, Wei Yongjun wrote:
> In case of error, the function read_mapping_page() returns
> ERR_PTR() not NULL. The NULL test in the return value check
> should be replaced with IS_ERR().
>
> Fixes: fe7c2423570d ("erofs: use read_mapping_page instead of sb_bread")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Right... That is my mistake on recent killing bh
transformation...
I have no idea this patch could be merged for -rc1
since I don't know Greg could still accept patches
or freezed...
Since it's an error handling path and trivial, if
it's some late, could I submit this later after
erofs is merged into mainline (if it's ok) for -rc1?
(or maybe -rc2?)
Thanks,
Gao Xiang
> ---
> fs/erofs/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index caf9a95173b0..0e369494f2f2 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -105,9 +105,9 @@ static int erofs_read_superblock(struct super_block *sb)
> int ret;
>
> page = read_mapping_page(sb->s_bdev->bd_inode->i_mapping, 0, NULL);
> - if (!page) {
> + if (IS_ERR(page)) {
> erofs_err(sb, "cannot read erofs superblock");
> - return -EIO;
> + return PTR_ERR(page);
> }
>
> sbi = EROFS_SB(sb);
>
>
>
next prev parent reply other threads:[~2019-09-18 8:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 8:30 [PATCH -next] erofs: fix return value check in erofs_read_superblock() Wei Yongjun
2019-09-18 8:30 ` Wei Yongjun
2019-09-18 8:33 ` Gao Xiang [this message]
2019-09-18 8:33 ` Gao Xiang
2019-09-18 8:33 ` Gao Xiang
2019-09-19 0:54 ` Chao Yu
2019-09-19 0:54 ` Chao Yu
2019-09-19 0:54 ` Chao Yu
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=20190918083308.GA30134@architecture4 \
--to=gaoxiang25@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=weiyongjun1@huawei.com \
--cc=xiang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.