Skip to content

Commit

Permalink
fuse: no ENOENT from fuse device read
Browse files Browse the repository at this point in the history
Don't return -ENOENT for a read() on the fuse device when the request was
aborted.  Instead return -ENODEV, meaning the filesystem has been
force-umounted or aborted.

Previously ENOENT meant that the request was interrupted, but now the
'aborted' flag is not set in case of interrupts.

Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Oct 17, 2007
1 parent a131de0 commit c9c9d7d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,12 @@ static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov,
fuse_copy_finish(&cs);
spin_lock(&fc->lock);
req->locked = 0;
if (!err && req->aborted)
err = -ENOENT;
if (req->aborted) {
request_end(fc, req);
return -ENODEV;
}
if (err) {
if (!req->aborted)
req->out.h.error = -EIO;
req->out.h.error = -EIO;
request_end(fc, req);
return err;
}
Expand Down

0 comments on commit c9c9d7d

Please sign in to comment.