[Virtio-fs] [PATCH v4 1/3] virtiofsd: extract lo_do_open() from lo_open()

Stefan Hajnoczi stefanha at redhat.com
Wed Feb 3 16:57:42 UTC 2021


On Wed, Feb 03, 2021 at 02:47:30PM +0000, Dr. David Alan Gilbert wrote:
> * Greg Kurz (groug at kaod.org) wrote:
> > On Wed,  3 Feb 2021 11:37:17 +0000
> > Stefan Hajnoczi <stefanha at redhat.com> wrote:
> > 
> > > Both lo_open() and lo_create() have similar code to open a file. Extract
> > > a common lo_do_open() function from lo_open() that will be used by
> > > lo_create() in a later commit.
> > > 
> > > Since lo_do_open() does not otherwise need fuse_req_t req, convert
> > > lo_add_fd_mapping() to use struct lo_data *lo instead.
> > > 
> > > Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com>
> > > ---
> > 
> > With the s/ENOMEM/-ENOMEM/ change in lo_do_open() suggested by patchew,
> 
> Isn't it actually the return -errno that's different from the original?

Yes. It should be return errno since lo_open() expected err = 0
(success) or a positive errno.

Will fix.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20210203/b1a41dad/attachment.sig>


More information about the Virtio-fs mailing list