linux-uconsole/fs/fuse
Miklos Szeredi eeea0346fc fuse: flush background queue on connection close
commit 595afaf9e6 upstream.

David Bartly reported that fuse can hang in fuse_get_req_nofail() when
the connection to the filesystem server is no longer active.

If bg_queue is not empty then flush_bg_queue() called from
request_end() can put more requests on to the pending queue.  If this
happens while ending requests on the processing queue then those
background requests will be queued to the pending list and never
ended.

Another problem is that fuse_dev_release() didn't wake up processes
sleeping on blocked_waitq.

Solve this by:

 a) flushing the background queue before calling end_requests() on the
    pending and processing queues

 b) setting blocked = 0 and waking up processes waiting on
    blocked_waitq()

Thanks to David for an excellent bug report.

Reported-by: David Bartley <andareed@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 13:17:46 -07:00
..
control.c fuse: add fusectl interface to max_background 2009-09-16 14:15:29 +02:00
cuse.c CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00
dev.c fuse: flush background queue on connection close 2010-09-20 13:17:46 -07:00
dir.c fuse: reject O_DIRECT flag also in fuse_create 2009-11-27 16:37:13 +01:00
file.c mm: flush dcache before writing into page to avoid alias 2010-02-09 04:50:59 -08:00
fuse_i.h truncate: use new helpers 2009-09-24 08:41:47 -04:00
inode.c truncate: use new helpers 2009-09-24 08:41:47 -04:00
Kconfig fs/Kconfig: move fuse out 2009-01-22 13:15:55 +03:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00