diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 10:42:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 10:42:43 -0700 |
commit | f741a79e982cf56d7584435bad663553ffe6715f (patch) | |
tree | 491f0a8a05d9add4c0338ee8af4a18f3508503cd /fs/fuse/dev.c | |
parent | 73d5a8675f32b8e22e11773b314324316f920192 (diff) | |
parent | e7c0a167860620bd2938366896964f729ddaeaaa (diff) | |
download | op-kernel-dev-f741a79e982cf56d7584435bad663553ffe6715f.zip op-kernel-dev-f741a79e982cf56d7584435bad663553ffe6715f.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: make fuse_dentry_revalidate() RCU aware
fuse: make fuse_permission() RCU aware
fuse: wakeup pollers on connection release/abort
fuse: reduce size of struct fuse_request
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index cf8d28d..213d3cf 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1910,6 +1910,21 @@ __acquires(fc->lock) kfree(dequeue_forget(fc, 1, NULL)); } +static void end_polls(struct fuse_conn *fc) +{ + struct rb_node *p; + + p = rb_first(&fc->polled_files); + + while (p) { + struct fuse_file *ff; + ff = rb_entry(p, struct fuse_file, polled_node); + wake_up_interruptible_all(&ff->poll_wait); + + p = rb_next(p); + } +} + /* * Abort all requests. * @@ -1937,6 +1952,7 @@ void fuse_abort_conn(struct fuse_conn *fc) fc->blocked = 0; end_io_requests(fc); end_queued_requests(fc); + end_polls(fc); wake_up_all(&fc->waitq); wake_up_all(&fc->blocked_waitq); kill_fasync(&fc->fasync, SIGIO, POLL_IN); @@ -1953,6 +1969,7 @@ int fuse_dev_release(struct inode *inode, struct file *file) fc->connected = 0; fc->blocked = 0; end_queued_requests(fc); + end_polls(fc); wake_up_all(&fc->blocked_waitq); spin_unlock(&fc->lock); fuse_conn_put(fc); |