Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c9c9d7df5f8aed8b738f1ace45700e2001c1faeb
Commit:     c9c9d7df5f8aed8b738f1ace45700e2001c1faeb
Parent:     a131de0a482ac95e6469f56981c7b063593fdc5d
Author:     Miklos Szeredi <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:31:05 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:43:04 2007 -0700

    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: Miklos Szeredi <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/fuse/dev.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index cc6c290..db534bc 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -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;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to