Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9c9d7df authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Linus Torvalds
Browse files

fuse: no ENOENT from fuse device read



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: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a131de0a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -747,10 +747,11 @@ 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;
		request_end(fc, req);
		return err;