Skip to content

Commit

Permalink
fuse: return -EIOCBQUEUED from fuse_direct_IO() for all async requests
Browse files Browse the repository at this point in the history
If request submission fails for an async request (i.e.,
get_user_pages() returns -ERESTARTSYS), we currently skip the
-EIOCBQUEUED return and drop into wait_for_sync_kiocb() forever.

Avoid this by always returning -EIOCBQUEUED for async requests. If
an error occurs, the error is passed into fuse_aio_complete(),
returned via aio_complete() and thus propagated to userspace via
io_getevents().

Signed-off-by: Brian Foster <[email protected]>
Reviewed-by: Maxim Patlasov <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
Brian Foster authored and Miklos Szeredi committed Jun 3, 2013
1 parent 28420da commit c9ecf98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
fuse_aio_complete(io, ret < 0 ? ret : 0, -1);

/* we have a non-extending, async request, so return */
if (ret > 0 && !is_sync_kiocb(iocb))
if (!is_sync_kiocb(iocb))
return -EIOCBQUEUED;

ret = wait_on_sync_kiocb(iocb);
Expand Down

0 comments on commit c9ecf98

Please sign in to comment.