summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-05-12 23:48:34 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-05-12 23:48:34 +0000
commit7fd36ebeeec9244a7431bb010e6e3c5e4848a0d5 (patch)
tree5fb03a9aafdd1cec5f4f6ff7f1873174cb89b66c /ipc
parentba2dacab305c598cd4c34a604f8e276bf5bab5ff (diff)
Merge with Linux 2.3.99-pre8. Linus must hate me, too man patches ;-)
Diffstat (limited to 'ipc')
-rw-r--r--ipc/sem.c2
-rw-r--r--ipc/shm.c26
2 files changed, 14 insertions, 14 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index a8dc53890..1976697c1 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -97,7 +97,7 @@ int sem_ctls[4] = {SEMMSL, SEMMNS, SEMOPM, SEMMNI};
#define sc_semopm (sem_ctls[2])
#define sc_semmni (sem_ctls[3])
-static int used_sems = 0;
+static int used_sems;
void __init sem_init (void)
{
diff --git a/ipc/shm.c b/ipc/shm.c
index 6a10e4b83..62076d18a 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -188,9 +188,9 @@ static int shm_ctlall;
static int shm_ctlmni;
static int shm_mode;
-static int shm_tot = 0; /* total number of shared memory pages */
-static int shm_rss = 0; /* number of shared memory pages that are in memory */
-static int shm_swp = 0; /* number of shared memory pages that are in swap */
+static int shm_tot; /* total number of shared memory pages */
+static int shm_rss; /* number of shared memory pages that are in memory */
+static int shm_swp; /* number of shared memory pages that are in swap */
/* locks order:
pagecache_lock
@@ -208,9 +208,9 @@ static int shm_swp = 0; /* number of shared memory pages that are in swap */
*/
/* some statistics */
-static ulong swap_attempts = 0;
-static ulong swap_successes = 0;
-static ulong used_segs = 0;
+static ulong swap_attempts;
+static ulong swap_successes;
+static ulong used_segs;
void __init shm_init (void)
{
@@ -1348,7 +1348,7 @@ static struct page * shm_nopage_core(struct shmid_kernel *shp, unsigned int idx,
could potentially fault on our pte under us */
if (pte_none(pte)) {
shm_unlock(shp->id);
- page = alloc_page(GFP_HIGHUSER);
+ page = page_cache_alloc();
if (!page)
goto oom;
clear_user_highpage(page, address);
@@ -1380,7 +1380,7 @@ static struct page * shm_nopage_core(struct shmid_kernel *shp, unsigned int idx,
}
/* pte_val(pte) == SHM_ENTRY (shp, idx) */
- get_page(pte_page(pte));
+ page_cache_get(pte_page(pte));
return pte_page(pte);
oom:
@@ -1448,7 +1448,7 @@ static void shm_swap_postop(struct page *page)
lock_kernel();
rw_swap_page(WRITE, page, 0);
unlock_kernel();
- __free_page(page);
+ page_cache_release(page);
}
static int shm_swap_preop(swp_entry_t *swap_entry)
@@ -1470,8 +1470,8 @@ static int shm_swap_preop(swp_entry_t *swap_entry)
/*
* Goes through counter = (shm_rss >> prio) present shm pages.
*/
-static unsigned long swap_id = 0; /* currently being swapped */
-static unsigned long swap_idx = 0; /* next to swap */
+static unsigned long swap_id; /* currently being swapped */
+static unsigned long swap_idx; /* next to swap */
int shm_swap (int prio, int gfp_mask)
{
@@ -1537,7 +1537,7 @@ static void shm_unuse_page(struct shmid_kernel *shp, unsigned long idx,
pte = pte_mkdirty(mk_pte(page, PAGE_SHARED));
SHM_ENTRY(shp, idx) = pte;
- get_page(page);
+ page_cache_get(page);
shm_rss++;
shm_swp--;
@@ -1652,7 +1652,7 @@ done:
#define VMA_TO_SHP(vma) ((vma)->vm_file->private_data)
static spinlock_t zmap_list_lock = SPIN_LOCK_UNLOCKED;
-static unsigned long zswap_idx = 0; /* next to swap */
+static unsigned long zswap_idx; /* next to swap */
static struct shmid_kernel *zswap_shp = &zshmid_kernel;
static int zshm_rss;