From 703028c763ccfa99709e12dcfe3255d5b4a8d2c1 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sun, 20 Mar 2005 20:19:21 +0000 Subject: [PATCH] fix --- ChangeLog | 4 ++++ kernel/dev.c | 4 ++++ kernel/fuse_i.h | 1 + 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 34a6009..6c8c2ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-03-19 Miklos Szeredi + + * kernel: add locking to background list (fixes previous fix) + 2005-03-18 Miklos Szeredi * 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 -- 2.30.2