diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | kernel/dev.c | 4 | ||||
-rw-r--r-- | kernel/fuse_i.h | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,7 @@ +2005-03-19 Miklos Szeredi <miklos@szeredi.hu> + + * kernel: add locking to background list (fixes previous fix) + 2005-03-18 Miklos Szeredi <miklos@szeredi.hu> * kernel: fix bug which could cause leave busy inodes after diff --git a/kernel/dev.c b/kernel/dev.c index 537c273..5941035 100644 --- a/kernel/dev.c +++ b/kernel/dev.c @@ -186,7 +186,9 @@ void fuse_release_background(struct fuse_req *req) iput(req->inode2); if (req->file) fput(req->file); + spin_lock(&fuse_lock); list_del(&req->bg_entry); + spin_unlock(&fuse_lock); } /* Called with fuse_lock, unlocks it */ @@ -362,7 +364,9 @@ void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req) void request_send_background(struct fuse_conn *fc, struct fuse_req *req) { req->isreply = 1; + spin_lock(&fuse_lock); background_request(fc, req); + spin_unlock(&fuse_lock); request_send_nowait(fc, req); } diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h index 0f671f2..d877071 100644 --- a/kernel/fuse_i.h +++ b/kernel/fuse_i.h @@ -371,6 +371,7 @@ extern struct file_operations fuse_dev_operations; * - the private_data field of the device file * - the s_fs_info field of the super block * - unused_list, pending, processing lists in fuse_conn + * - background list in fuse_conn * - the unique request ID counter reqctr in fuse_conn * - the sb (super_block) field in fuse_conn * - the file (device file) field in fuse_conn |