[uClinux-dev] [PATCH] NFS rooting issues

Allon Stern allon.stern at argonst.com
Thu Feb 7 14:46:40 EST 2008


Not sure of the protocol for submitting patches, but here's what I  
did to get NFS rooting to work.

The patch allows machines with no MMU to mmap NFS files (restores  
behavior or previous kernel which worked). This is against the 2.6.24- 
uc0 kernel.

--- linux-2.6.x/fs/nfs/file.c.orig	2008-02-07 14:34:41.000000000 -0500
+++ linux-2.6.x/fs/nfs/file.c	2008-02-07 14:34:17.000000000 -0500
@@ -281,9 +281,13 @@ nfs_file_mmap(struct file * file, struct

  	status = nfs_revalidate_mapping(inode, file->f_mapping);
  	if (!status) {
+#ifndef CONFIG_MMU
+        status = generic_file_mmap(file, vma);
+#else
  		vma->vm_ops = &nfs_file_vm_ops;
  		vma->vm_flags |= VM_CAN_NONLINEAR;
  		file_accessed(file);
+#endif
  	}
  	return status;
  }


-
allon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20080207/85445495/attachment.html


More information about the uClinux-dev mailing list