patch-2.4.13 linux/ipc/shm.c
Next file: linux/kernel/context.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Wed Oct 17 14:16:39 2001
- Orig file:
v2.4.12/linux/ipc/shm.c
- Orig date:
Sun Sep 23 11:41:01 2001
diff -u --recursive --new-file v2.4.12/linux/ipc/shm.c linux/ipc/shm.c
@@ -348,6 +348,7 @@
static void shm_get_stat (unsigned long *rss, unsigned long *swp)
{
+ struct shmem_inode_info *info;
int i;
*rss = 0;
@@ -361,10 +362,11 @@
if(shp == NULL)
continue;
inode = shp->shm_file->f_dentry->d_inode;
- spin_lock (&inode->u.shmem_i.lock);
+ info = SHMEM_I(inode);
+ spin_lock (&info->lock);
*rss += inode->i_mapping->nrpages;
- *swp += inode->u.shmem_i.swapped;
- spin_unlock (&inode->u.shmem_i.lock);
+ *swp += info->swapped;
+ spin_unlock (&info->lock);
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)