diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
commit | 99a7e12f34b3661a0d1354eef83a0eef4df5e34c (patch) | |
tree | 3560aca9ca86792f9ab7bd87861ea143a1b3c7a3 /ipc | |
parent | e73a04659c0b8cdee4dd40e58630e2cf63afb316 (diff) |
Merge with Linux 2.3.38.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/shm.c | 10 | ||||
-rw-r--r-- | ipc/util.c | 4 |
2 files changed, 6 insertions, 8 deletions
@@ -549,8 +549,8 @@ asmlinkage long sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr) down(¤t->mm->mmap_sem); err = -EINVAL; shp = shm_lock(shmid); - if(shp == NULL) - goto out_unlock_up; + if (!shp) + goto out_up; err = -EACCES; if (ipcperms(&shp->u.shm_perm, flg)) @@ -799,7 +799,7 @@ oom: static unsigned long swap_id = 0; /* currently being swapped */ static unsigned long swap_idx = 0; /* next to swap */ -int shm_swap (int prio, int gfp_mask) +int shm_swap (int prio, int gfp_mask, zone_t *zone) { pte_t page; struct shmid_kernel *shp; @@ -849,9 +849,7 @@ check_table: if (!pte_present(page)) goto check_table; page_map = pte_page(page); - if ((gfp_mask & __GFP_DMA) && !PageDMA(page_map)) - goto check_table; - if (!(gfp_mask & __GFP_HIGHMEM) && PageHighMem(page_map)) + if (zone && (!memclass(page_map->zone, zone))) goto check_table; swap_attempts++; diff --git a/ipc/util.c b/ipc/util.c index d41d5aef2..6008b0d99 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -130,7 +130,7 @@ found: if(ids->seq > ids->seq_max) ids->seq = 0; - ipc_lock(ids,id); + spin_lock(&ids->ary); ids->entries[id].p = new; return id; } @@ -214,7 +214,7 @@ void sem_exit (void) return; } -int shm_swap (int prio, int gfp_mask) +int shm_swap (int prio, int gfp_mask, zone_t *zone) { return 0; } |