patch-2.1.45 linux/drivers/sbus/char/vfc_dev.c

Next file: linux/drivers/sbus/char/weitek.c
Previous file: linux/drivers/sbus/char/tcx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.44/linux/drivers/sbus/char/vfc_dev.c linux/drivers/sbus/char/vfc_dev.c
@@ -577,11 +577,12 @@
 	if(vma->vm_offset & ~PAGE_MASK) return -ENXIO;
 	vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO | VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE;
 	map_offset=(unsigned int)dev->phys_regs;
-	ret=io_remap_page_range(vma->vm_start,map_offset,map_size, 
-				vma->vm_page_prot, dev->which_io);
-	if(ret) return -EAGAIN;
-	vma->vm_inode=inode;
-	atomic_inc(&inode->i_count);
+	ret = io_remap_page_range(vma->vm_start,map_offset,map_size, 
+				  vma->vm_page_prot, dev->which_io);
+	if(ret)
+		return -EAGAIN;
+
+	vma->vm_dentry = dget(file->f_dentry);
 	return 0;
 }
 

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