patch-2.1.79 linux/fs/fat/mmap.c

Next file: linux/fs/hfs/ChangeLog
Previous file: linux/fs/fat/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/fs/fat/mmap.c linux/fs/fat/mmap.c
@@ -97,7 +97,10 @@
 int fat_mmap(struct file * file, struct vm_area_struct * vma)
 {
 	struct inode *inode = file->f_dentry->d_inode;
-	
+	if(MSDOS_SB(inode->i_sb)->cvf_format)
+	  if(MSDOS_SB(inode->i_sb)->cvf_format->cvf_mmap)
+	    return MSDOS_SB(inode->i_sb)->cvf_format->cvf_mmap(file,vma);
+
 	if (vma->vm_flags & VM_SHARED)	/* only PAGE_COW or read-only supported now */
 		return -EINVAL;
 	if (vma->vm_offset & (inode->i_sb->s_blocksize - 1))
@@ -114,4 +117,14 @@
 	return 0;
 }
 
+
+int fat_readpage(struct inode * inode, struct page * page)
+{
+	if(MSDOS_SB(inode->i_sb)->cvf_format)
+	  if(MSDOS_SB(inode->i_sb)->cvf_format->cvf_readpage)
+	    return MSDOS_SB(inode->i_sb)->cvf_format->cvf_readpage(inode,page);
+	    
+	printk("fat_readpage called with no handler (shouldn't happen)\n");
+	return -1;
+}
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov