patch-2.1.48 linux/arch/sparc/mm/srmmu.c

Next file: linux/arch/sparc/mm/sun4c.c
Previous file: linux/arch/sparc/kernel/sys_sunos.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.47/linux/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c
@@ -1,4 +1,4 @@
-/* $Id: srmmu.c,v 1.148 1997/06/24 15:48:02 jj Exp $
+/* $Id: srmmu.c,v 1.149 1997/07/20 05:59:34 davem Exp $
  * srmmu.c:  SRMMU specific routines for memory management.
  *
  * Copyright (C) 1995 David S. Miller  (davem@caip.rutgers.edu)
@@ -2214,7 +2214,8 @@
 {
 	if((vma->vm_flags & (VM_WRITE|VM_SHARED)) == (VM_WRITE|VM_SHARED)) {
 		struct vm_area_struct *vmaring;
-		struct inode *inode;
+		struct dentry *dentry;
+		struct inode *inode = NULL;
 		unsigned long flags, offset, vaddr, start;
 		int alias_found = 0;
 		pgd_t *pgdp;
@@ -2223,7 +2224,9 @@
 
 		save_and_cli(flags);
 
-		inode = vma->vm_inode;
+		dentry = vma->vm_dentry;
+		if(dentry)
+			inode = dentry->d_inode;
 		if (!inode)
 			goto done;
 		offset = (address & PAGE_MASK) - vma->vm_start;

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