patch-2.1.89 linux/fs/ncpfs/mmap.c

Next file: linux/fs/ncpfs/ncplib_kernel.c
Previous file: linux/fs/ncpfs/ioctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.88/linux/fs/ncpfs/mmap.c linux/fs/ncpfs/mmap.c
@@ -33,7 +33,8 @@
 static unsigned long ncp_file_mmap_nopage(struct vm_area_struct *area,
 				     unsigned long address, int no_share)
 {
-	struct dentry *dentry = area->vm_dentry;
+	struct file *file = area->vm_file;
+	struct dentry *dentry = file->f_dentry;
 	struct inode *inode = dentry->d_inode;
 	unsigned long page;
 	unsigned int clear;
@@ -136,7 +137,8 @@
 		inode->i_atime = CURRENT_TIME;
 	}
 
-	vma->vm_dentry = dget(file->f_dentry);
+	vma->vm_file = file;
+	file->f_count++;
 	vma->vm_ops = &ncp_file_mmap;
 	return 0;
 }

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