aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-04-08 16:39:09 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-04-08 16:39:09 +0000
commit89814a18530fd45af0793c1dd7b240453421c1bf (patch)
tree858019a2d811e84319e21a0fa0d204b2821bbd48 /kernel/file.c
parentb7640d2ef760e0034eded92d0963c725057d7799 (diff)
downloadlibfuse-89814a18530fd45af0793c1dd7b240453421c1bf.tar.gz
fix
Diffstat (limited to 'kernel/file.c')
-rw-r--r--kernel/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/file.c b/kernel/file.c
index a886546..e7de38a 100644
--- a/kernel/file.c
+++ b/kernel/file.c
@@ -508,6 +508,10 @@ static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf,
unsigned offset = user_addr & ~PAGE_MASK;
int npages;
+ /* This doesn't work with nfsd */
+ if (!current->mm)
+ return -EPERM;
+
nbytes = min(nbytes, (unsigned) FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT);
npages = (nbytes + offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
npages = min(npages, FUSE_MAX_PAGES_PER_REQ);