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

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

diff -u --recursive --new-file v2.3.44/linux/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c
@@ -1366,7 +1366,7 @@
 	if((vma->vm_flags & (VM_WRITE|VM_SHARED)) == (VM_WRITE|VM_SHARED)) {
 		struct vm_area_struct *vmaring;
 		struct file *file;
-		struct inode *inode;
+		struct address_space *mapping;
 		unsigned long flags, offset, vaddr, start;
 		int alias_found = 0;
 		pgd_t *pgdp;
@@ -1378,10 +1378,10 @@
 		file = vma->vm_file;
 		if (!file)
 			goto done;
-		inode = file->f_dentry->d_inode;
+		mapping = file->f_dentry->d_inode->i_mapping;
 		offset = (address & PAGE_MASK) - vma->vm_start;
-		spin_lock(&inode->i_shared_lock);
-		vmaring = inode->i_mmap; 
+		spin_lock(&mapping->i_shared_lock);
+		vmaring = mapping->i_mmap; 
 		do {
 			/* Do not mistake ourselves as another mapping. */
 			if(vmaring == vma)
@@ -1414,7 +1414,7 @@
 				}
 			}
 		} while ((vmaring = vmaring->vm_next_share) != NULL);
-		spin_unlock(&inode->i_shared_lock);
+		spin_unlock(&mapping->i_shared_lock);
 
 		if(alias_found && ((pte_val(pte) & SRMMU_CACHE) != 0)) {
 			pgdp = srmmu_pgd_offset(vma->vm_mm, address);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)