diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-06-25 08:48:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:19 -0400 |
commit | 51eb01e73599efb88c6c20b1c226d20309a75450 (patch) | |
tree | c37e7a61ce7c049a4615dfb2ee994866d3c85bd6 /fs/fuse/inode.c | |
parent | 3e8c54fad89144b8d63cc41619f363df1ec7cc42 (diff) |
[PATCH] fuse: no backgrounding on interrupt
Don't put requests into the background when a fatal interrupt occurs while the
request is in userspace. This removes a major wart from the implementation.
Backgrounding of requests was introduced to allow breaking of deadlocks.
However now the same can be achieved by aborting the filesystem through the
'abort' sysfs attribute.
This is a change in the interface, but should not cause problems, since these
kinds of deadlocks never happen during normal operation.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index a13c0f529058..0225729977c4 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/file.h> | 13 | #include <linux/file.h> |
14 | #include <linux/mount.h> | ||
15 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
@@ -204,20 +203,14 @@ static void fuse_put_super(struct super_block *sb) | |||
204 | { | 203 | { |
205 | struct fuse_conn *fc = get_fuse_conn_super(sb); | 204 | struct fuse_conn *fc = get_fuse_conn_super(sb); |
206 | 205 | ||
207 | down_write(&fc->sbput_sem); | ||
208 | while (!list_empty(&fc->background)) | ||
209 | fuse_release_background(fc, | ||
210 | list_entry(fc->background.next, | ||
211 | struct fuse_req, bg_entry)); | ||
212 | |||
213 | spin_lock(&fc->lock); | 206 | spin_lock(&fc->lock); |
214 | fc->mounted = 0; | ||
215 | fc->connected = 0; | 207 | fc->connected = 0; |
208 | fc->blocked = 0; | ||
216 | spin_unlock(&fc->lock); | 209 | spin_unlock(&fc->lock); |
217 | up_write(&fc->sbput_sem); | ||
218 | /* Flush all readers on this fs */ | 210 | /* Flush all readers on this fs */ |
219 | kill_fasync(&fc->fasync, SIGIO, POLL_IN); | 211 | kill_fasync(&fc->fasync, SIGIO, POLL_IN); |
220 | wake_up_all(&fc->waitq); | 212 | wake_up_all(&fc->waitq); |
213 | wake_up_all(&fc->blocked_waitq); | ||
221 | kobject_del(&fc->kobj); | 214 | kobject_del(&fc->kobj); |
222 | kobject_put(&fc->kobj); | 215 | kobject_put(&fc->kobj); |
223 | } | 216 | } |
@@ -386,8 +379,6 @@ static struct fuse_conn *new_conn(void) | |||
386 | INIT_LIST_HEAD(&fc->pending); | 379 | INIT_LIST_HEAD(&fc->pending); |
387 | INIT_LIST_HEAD(&fc->processing); | 380 | INIT_LIST_HEAD(&fc->processing); |
388 | INIT_LIST_HEAD(&fc->io); | 381 | INIT_LIST_HEAD(&fc->io); |
389 | INIT_LIST_HEAD(&fc->background); | ||
390 | init_rwsem(&fc->sbput_sem); | ||
391 | kobj_set_kset_s(fc, connections_subsys); | 382 | kobj_set_kset_s(fc, connections_subsys); |
392 | kobject_init(&fc->kobj); | 383 | kobject_init(&fc->kobj); |
393 | atomic_set(&fc->num_waiting, 0); | 384 | atomic_set(&fc->num_waiting, 0); |
@@ -543,7 +534,6 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
543 | goto err_kobject_del; | 534 | goto err_kobject_del; |
544 | 535 | ||
545 | sb->s_root = root_dentry; | 536 | sb->s_root = root_dentry; |
546 | fc->mounted = 1; | ||
547 | fc->connected = 1; | 537 | fc->connected = 1; |
548 | kobject_get(&fc->kobj); | 538 | kobject_get(&fc->kobj); |
549 | file->private_data = fc; | 539 | file->private_data = fc; |