Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: fix "direct_io" private mmap
fuse: fix argument type in fuse_get_user_pages()

+5 -3
+5 -3
fs/fuse/file.c
··· 938 938 } 939 939 940 940 static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf, 941 - unsigned *nbytesp, int write) 941 + size_t *nbytesp, int write) 942 942 { 943 - unsigned nbytes = *nbytesp; 943 + size_t nbytes = *nbytesp; 944 944 unsigned long user_addr = (unsigned long) buf; 945 945 unsigned offset = user_addr & ~PAGE_MASK; 946 946 int npages; ··· 955 955 return 0; 956 956 } 957 957 958 - nbytes = min(nbytes, (unsigned) FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT); 958 + nbytes = min_t(size_t, nbytes, FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT); 959 959 npages = (nbytes + offset + PAGE_SIZE - 1) >> PAGE_SHIFT; 960 960 npages = clamp(npages, 1, FUSE_MAX_PAGES_PER_REQ); 961 961 down_read(&current->mm->mmap_sem); ··· 1297 1297 /* Can't provide the coherency needed for MAP_SHARED */ 1298 1298 if (vma->vm_flags & VM_MAYSHARE) 1299 1299 return -ENODEV; 1300 + 1301 + invalidate_inode_pages2(file->f_mapping); 1300 1302 1301 1303 return generic_file_mmap(file, vma); 1302 1304 }