linux-kernel-test/fs/fuse
Miklos Szeredi 595afaf9e6 fuse: flush background queue on connection close
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>
CC: stable@kernel.org
2010-09-07 13:42:41 +02:00
..
control.c fuse: add fusectl interface to max_background 2009-09-16 14:15:29 +02:00
cuse.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dev.c fuse: flush background queue on connection close 2010-09-07 13:42:41 +02:00
dir.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-08-10 11:26:52 -07:00
file.c fuse: add store request 2010-07-12 14:41:40 +02:00
fuse_i.h fuse: add retrieve request 2010-07-12 14:41:40 +02:00
inode.c convert remaining ->clear_inode() to ->evict_inode() 2010-08-09 16:48:37 -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