kernel-ark/fs/fuse
Miklos Szeredi 9ffbb91623 [PATCH] fuse: fix hang on SMP
Fuse didn't always call i_size_write() with i_mutex held which caused rare
hangs on SMP/32bit.  This bug has been present since fuse-2.2, well before
being merged into mainline.

The simplest solution is to protect i_size_write() with the per-connection
spinlock.  Using i_mutex for this purpose would require some restructuring of
the code and I'm not even sure it's always safe to acquire i_mutex in all
places i_size needs to be set.

Since most of vmtruncate is already duplicated for other reasons, duplicate
the remaining part as well, making all i_size_write() calls internal to fuse.

Using i_size_write() was unnecessary in fuse_init_inode(), since this function
is only called on a newly created locked inode.

Reported by a few people over the years, but special thanks to Dana Henriksen
who was persistent enough in helping me debug it.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:45 -07:00
..
control.c [PATCH] r/o bind mount prepwork: inc_nlink() helper 2006-10-01 00:39:30 -07:00
dev.c [PATCH] Remove readv/writev methods and use aio_read/aio_write instead 2006-10-01 00:39:28 -07:00
dir.c [PATCH] fuse: fix hang on SMP 2006-10-17 08:18:45 -07:00
file.c [PATCH] fuse: fix hang on SMP 2006-10-17 08:18:45 -07:00
fuse_i.h [PATCH] fuse: use jiffies_64 2006-07-31 13:28:43 -07:00
inode.c [PATCH] fuse: fix hang on SMP 2006-10-17 08:18:45 -07:00
Makefile [PATCH] fuse: add control filesystem 2006-06-25 10:01:19 -07:00