From: Gao Xiang <gaoxiang25@huawei.com>
To: Yue Hu <zbestahu@gmail.com>, <yuchao0@huawei.com>,
<gregkh@linuxfoundation.org>
Cc: <linux-erofs@lists.ozlabs.org>, <devel@driverdev.osuosl.org>,
<linux-kernel@vger.kernel.org>, <huyue2@yulong.com>,
Miao Xie <miaoxie@huawei.com>
Subject: Re: [PATCH RESEND] staging: erofs: return the error value if fill_inline_data() fails
Date: Wed, 26 Jun 2019 17:02:48 +0800 [thread overview]
Message-ID: <a503962c-0d06-d186-3230-b208410939b0@huawei.com> (raw)
In-Reply-To: <20190626033038.9456-1-zbestahu@gmail.com>
Hi Yue,
On 2019/6/26 11:30, Yue Hu wrote:
> From: Yue Hu <huyue2@yulong.com>
>
> We should consider the error returned by fill_inline_data() when filling
> last page in fill_inode(). If not getting inode will be successful even
> though last page is bad. That is illogical. Also change -EAGAIN to 0 in
> fill_inline_data() to stand for successful filling.
>
> Signed-off-by: Yue Hu <huyue2@yulong.com>
ditto, add the tags from other guyes.
Thanks,
Gao Xiang
> ---
> drivers/staging/erofs/inode.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c
> index d6e1e16..1433f25 100644
> --- a/drivers/staging/erofs/inode.c
> +++ b/drivers/staging/erofs/inode.c
> @@ -156,7 +156,7 @@ static int fill_inline_data(struct inode *inode, void *data,
> inode->i_link = lnk;
> set_inode_fast_symlink(inode);
> }
> - return -EAGAIN;
> + return 0;
> }
>
> static int fill_inode(struct inode *inode, int isdir)
> @@ -223,7 +223,7 @@ static int fill_inode(struct inode *inode, int isdir)
> inode->i_mapping->a_ops = &erofs_raw_access_aops;
>
> /* fill last page if inline data is available */
> - fill_inline_data(inode, data, ofs);
> + err = fill_inline_data(inode, data, ofs);
> }
>
> out_unlock:
>
prev parent reply other threads:[~2019-06-26 9:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 3:30 Yue Hu
2019-06-26 7:13 ` Chao Yu
2019-06-26 9:02 ` Gao Xiang [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=a503962c-0d06-d186-3230-b208410939b0@huawei.com \
--to=gaoxiang25@huawei.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=huyue2@yulong.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=yuchao0@huawei.com \
--cc=zbestahu@gmail.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®