diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-09 11:37:52 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-09 11:37:52 -0400 |
commit | ce60a2f15764f296b0467960759351702c7d2986 (patch) | |
tree | ba5a61daee91b252face877b02b707be3636e488 /fs | |
parent | f4efdd65b754ebbf41484d3a2255c59282720650 (diff) |
fuse: fix argument type in fuse_get_user_pages()
Fix the following warning:
fs/fuse/file.c: In function 'fuse_direct_io':
fs/fuse/file.c:1002: warning: passing argument 3 of 'fuse_get_user_pages' from incompatible pointer type
This was introduced by commit f4975c67 "fuse: allow kernel to access
"direct_io" files".
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 2b25133524a3..0946861b10b7 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -938,9 +938,9 @@ static void fuse_release_user_pages(struct fuse_req *req, int write) | |||
938 | } | 938 | } |
939 | 939 | ||
940 | static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf, | 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 | unsigned long user_addr = (unsigned long) buf; | 944 | unsigned long user_addr = (unsigned long) buf; |
945 | unsigned offset = user_addr & ~PAGE_MASK; | 945 | unsigned offset = user_addr & ~PAGE_MASK; |
946 | int npages; | 946 | int npages; |
@@ -955,7 +955,7 @@ static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf, | |||
955 | return 0; | 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 | npages = (nbytes + offset + PAGE_SIZE - 1) >> PAGE_SHIFT; | 959 | npages = (nbytes + offset + PAGE_SIZE - 1) >> PAGE_SHIFT; |
960 | npages = clamp(npages, 1, FUSE_MAX_PAGES_PER_REQ); | 960 | npages = clamp(npages, 1, FUSE_MAX_PAGES_PER_REQ); |
961 | down_read(¤t->mm->mmap_sem); | 961 | down_read(¤t->mm->mmap_sem); |