* Fix Oops in case of nfs export. Spotted by David Shaw
+ * Fix another Oops in case of write over nfs with direct_io turned
+ on. Again spotted by David Shaw
+
2005-04-07 Miklos Szeredi <miklos@szeredi.hu>
* Released 2.3-pre4
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);