diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-01 10:44:45 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-01 10:44:45 +0000 |
commit | cac547059462a58ec26159cdc408f5828cfe40e5 (patch) | |
tree | d818e5b4c1b5b5152bfdeff76ea2ae6f485d6cef /kernel/dev.c | |
parent | 56a61f09299d7257dde0f7dcaf041558bd334a05 (diff) | |
download | libfuse-cac547059462a58ec26159cdc408f5828cfe40e5.tar.gz |
fix
Diffstat (limited to 'kernel/dev.c')
-rw-r--r-- | kernel/dev.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/kernel/dev.c b/kernel/dev.c index 0f4de86..2c71a79 100644 --- a/kernel/dev.c +++ b/kernel/dev.c @@ -163,11 +163,13 @@ static void fuse_putback_request(struct fuse_conn *fc, struct fuse_req *req) else fuse_request_free(req); - /* If we are in debt decrease that first */ - if (fc->outstanding_debt) - fc->outstanding_debt--; - else - up(&fc->outstanding_sem); + if (!req->unaccounted) { + /* If we are in debt decrease that first */ + if (fc->outstanding_debt) + fc->outstanding_debt--; + else + up(&fc->outstanding_sem); + } spin_unlock(&fuse_lock); } @@ -322,9 +324,10 @@ static void queue_request(struct fuse_conn *fc, struct fuse_req *req) req->in.h.unique = fc->reqctr; req->in.h.len = sizeof(struct fuse_in_header) + len_args(req->in.numargs, (struct fuse_arg *) req->in.args); - if (!req->preallocated) { + if (!req->preallocated && !req->unaccounted) { /* If request is not preallocated (either FORGET or - RELEASE), then still decrease outstanding_sem, so + RELEASE), and is not unaccounted (SETLKW), + then still decrease outstanding_sem, so user can't open infinite number of files while not processing the RELEASE requests. However for efficiency do it without blocking, so if down() |