fuse: reset waiting
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 1 Jul 2015 14:25:56 +0000 (16:25 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 1 Jul 2015 14:25:56 +0000 (16:25 +0200)
Reset req->waiting in fuse_put_request().  This is needed for correct
accounting in fc->num_waiting for reserved requests.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/dev.c

index 6aa4803510e7e0df1ad2317c24d781ecd5bfbfd0..24f1d77b87a4fbcf3b40fff8ec90bbe50de2df9a 100644 (file)
@@ -287,8 +287,10 @@ void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req)
                        spin_unlock(&fc->lock);
                }
 
-               if (req->waiting)
+               if (req->waiting) {
                        atomic_dec(&fc->num_waiting);
+                       req->waiting = 0;
+               }
 
                if (req->stolen_file)
                        put_reserved_req(fc, req);