patch-1.3.24 linux/ipc/shm.c
Next file: linux/kernel/exit.c
Previous file: linux/include/net/sock.h
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Mon Sep 4 13:31:26 1995
- Orig file:
v1.3.23/linux/ipc/shm.c
- Orig date:
Sun Sep 3 12:27:03 1995
diff -u --recursive --new-file v1.3.23/linux/ipc/shm.c linux/ipc/shm.c
@@ -393,8 +393,8 @@
if (shp->attaches != shmd) {
printk("shm_close: shm segment (id=%ld) attach list inconsistent\n",
SWP_OFFSET(shmd->vm_pte) & SHM_ID_MASK);
- printk("shm_close: %d %08lx-%08lx %c%c%c%c %08lx %08lx\n",
- shmd->vm_task->pid, shmd->vm_start, shmd->vm_end,
+ printk("shm_close: %08lx-%08lx %c%c%c%c %08lx %08lx\n",
+ shmd->vm_start, shmd->vm_end,
shmd->vm_flags & VM_READ ? 'r' : '-',
shmd->vm_flags & VM_WRITE ? 'w' : '-',
shmd->vm_flags & VM_EXEC ? 'x' : '-',
@@ -435,7 +435,7 @@
tmp < shmd->vm_end;
tmp += PAGE_SIZE, shm_sgn += SWP_ENTRY(0, 1 << SHM_IDX_SHIFT))
{
- page_dir = pgd_offset(shmd->vm_task,tmp);
+ page_dir = pgd_offset(shmd->vm_mm,tmp);
page_middle = pmd_alloc(page_dir,tmp);
if (!page_middle)
return -ENOMEM;
@@ -514,7 +514,7 @@
shmd->vm_pte = SWP_ENTRY(SHM_SWP_TYPE, id);
shmd->vm_start = addr;
shmd->vm_end = addr + shp->shm_npages * PAGE_SIZE;
- shmd->vm_task = current;
+ shmd->vm_mm = current->mm;
shmd->vm_page_prot = (shmflg & SHM_RDONLY) ? PAGE_READONLY : PAGE_SHARED;
shmd->vm_flags = VM_SHM | VM_MAYSHARE | VM_SHARED
| VM_MAYREAD | VM_MAYEXEC | VM_READ | VM_EXEC
@@ -738,7 +738,7 @@
tmp = shmd->vm_start + (idx << PAGE_SHIFT) - shmd->vm_offset;
if (!(tmp >= shmd->vm_start && tmp < shmd->vm_end))
continue;
- page_dir = pgd_offset(shmd->vm_task,tmp);
+ page_dir = pgd_offset(shmd->vm_mm,tmp);
if (pgd_none(*page_dir) || pgd_bad(*page_dir)) {
printk("shm_swap: bad pgtbl! id=%ld start=%lx idx=%ld\n",
id, shmd->vm_start, idx);
@@ -765,8 +765,8 @@
set_pte(page_table,
__pte(shmd->vm_pte + SWP_ENTRY(0, idx << SHM_IDX_SHIFT)));
mem_map[MAP_NR(pte_page(pte))]--;
- if (shmd->vm_task->mm->rss > 0)
- shmd->vm_task->mm->rss--;
+ if (shmd->vm_mm->rss > 0)
+ shmd->vm_mm->rss--;
invalid++;
/* continue looping through circular list */
} while (0);
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this