From: piaojun <piaojun@huawei.com>
To: Eryu Guan <eguan@linux.alibaba.com>, Liu Bo <bo.liu@linux.alibaba.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [PATCH] virtiofs: fix return value of iomap_begin_upgrade_mapping
Date: Wed, 21 Aug 2019 14:19:48 +0800 [thread overview]
Message-ID: <5D5CE284.6060609@huawei.com> (raw)
In-Reply-To: <20190821061700.GR52397@e18g06458.et15sqa>
On 2019/8/21 14:17, Eryu Guan wrote:
> On Wed, Aug 21, 2019 at 02:10:38PM +0800, Liu Bo wrote:
>> Set ret = 0 if everything runs fine.
>>
>> Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
>
> FYI, this fixes generic/344 failure.
>
>> ---
>> fs/fuse/file.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
>> index eb7543a..d3c5e45 100644
>> --- a/fs/fuse/file.c
>> +++ b/fs/fuse/file.c
>> @@ -1985,6 +1985,7 @@ static int iomap_begin_upgrade_mapping(struct inode *inode, loff_t pos,
>>
>> out_fill_iomap:
>> fuse_fill_iomap(inode, pos, length, iomap, dmap, flags);
>> + ret = 0;
>
> I'd prefer setting ret in the if (dmap->writable) case, which seems more
> clear to me. i.e.
>
> if (dmap->writable) {
> ret = 0;
> goto out_fill_iomap;
> }
Agreed, and feel free to add:
Reviewed-by: Jun Piao <piaojun@huawei.com>
Jun
next prev parent reply other threads:[~2019-08-21 6:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 6:10 [Virtio-fs] [PATCH] virtiofs: fix return value of iomap_begin_upgrade_mapping Liu Bo
2019-08-21 6:17 ` Eryu Guan
2019-08-21 6:19 ` piaojun [this message]
2019-08-22 20:16 ` Vivek Goyal
2019-08-23 0:22 ` piaojun
2019-08-23 12:52 ` Vivek Goyal
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=5D5CE284.6060609@huawei.com \
--to=piaojun@huawei.com \
--cc=bo.liu@linux.alibaba.com \
--cc=eguan@linux.alibaba.com \
--cc=virtio-fs@redhat.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 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.