From: zbestahu@gmail.com (Yue Hu)
Subject: [PATCH] staging: erofs: return the error value if fill_inline_data() fails
Date: Tue, 25 Jun 2019 17:29:12 +0800 [thread overview]
Message-ID: <20190625172912.00002d55.zbestahu@gmail.com> (raw)
In-Reply-To: <b724c331-5338-d827-6618-1bded956c41d@aol.com>
On Tue, 25 Jun 2019 17:19:36 +0800
Gao Xiang <hsiangkao@aol.com> wrote:
> On 2019/6/25 ????3:59, Yue Hu Wrote:
> > From: Yue Hu <huyue2 at 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 at yulong.com>
>
> looks good to me, yet I think you need to Cc staging mailing list at
> least if you want to upstream quickly (including your older patches...)
>
>
> Reviewed-by: Gao Xiang <gaoxiang25 at huawei.com>
>
>
> (Don't forget to add 'PATCH RESEND' tag at the subject line if you
> resend these patches.)
Ok, got it.
Thx.
>
> 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:
> >
next prev parent reply other threads:[~2019-06-25 9:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 7:59 [PATCH] staging: erofs: return the error value if fill_inline_data() fails Yue Hu
2019-06-25 9:19 ` Gao Xiang
2019-06-25 9:29 ` Yue Hu [this message]
2019-06-26 1:43 ` Greg KH
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=20190625172912.00002d55.zbestahu@gmail.com \
--to=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;
as well as URLs for NNTP newsgroup(s).