3 @@ -651,11 +651,20 @@ static int fuse_copy_fill(struct fuse_co
4 return lock_request(cs->fc, cs->req);
8 +extern void (*fuse_flush_cache_all)(void);
11 /* Do as much copy to/from userspace buffer as we can */
12 static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size)
14 unsigned ncpy = min(*size, cs->len);
17 + // patch from mailing list, it is very important, otherwise,
18 + // can't mount, or ls mount point will hang
19 + fuse_flush_cache_all();
22 memcpy(cs->buf, *val, ncpy);
24 --- a/fs/fuse/fuse_i.h
25 +++ b/fs/fuse/fuse_i.h
32 #include <linux/fuse.h>
36 @@ -1211,6 +1211,10 @@ static int __init fuse_init(void)
37 printk(KERN_INFO "fuse init (API version %i.%i)\n",
38 FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
41 + printk("fuse init DCACHE_BUG workaround enabled\n");
44 INIT_LIST_HEAD(&fuse_conn_list);