3 @@ -512,6 +512,9 @@ static int fuse_copy_fill(struct fuse_co
8 + struct vm_area_struct *vma;
11 unlock_request(cs->req);
13 @@ -523,14 +526,22 @@ static int fuse_copy_fill(struct fuse_co
16 down_read(¤t->mm->mmap_sem);
18 err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
21 + err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
24 up_read(¤t->mm->mmap_sem);
28 offset = cs->addr % PAGE_SIZE;
29 cs->mapaddr = kmap_atomic(cs->pg, KM_USER0);
31 + r4k_flush_cache_page(vma, cs->addr);
33 cs->buf = cs->mapaddr + offset;
34 cs->len = min(PAGE_SIZE - offset, cs->seglen);
35 cs->seglen -= cs->len;
36 @@ -545,6 +556,11 @@ static inline int fuse_copy_do(struct fu
38 unsigned ncpy = min(*size, cs->len);
41 + // patch from mailing list, it is very important, otherwise,
42 + // can't mount, or ls mount point will hang
46 memcpy(cs->buf, *val, ncpy);
54 +//#if defined(__arm__) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
60 # include <linux/config.h>
63 @@ -739,6 +739,10 @@ static int __init fuse_init(void)
64 printk("fuse distribution version: %s\n", FUSE_VERSION);
68 +printk("fuse init: DCACHE_BUG enabled\n");
71 spin_lock_init(&fuse_lock);