Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.12-ac5 /ipc/shm.c

Filename:/ipc/shm.c
Lines Added:5
Lines Deleted:3
Also changed in: (Previous) 2.4.12-ac3  2.4.12-ac2  2.4.12-ac1  2.4.10-ac12  2.4.10-ac11  2.4.10-ac10 
(Following) 2.4.12-ac4  2.4.12-ac6  2.4.13-pre6  2.4.13  2.4.17-pre7  2.4.17-pre8 

Location
[  2.4.12-ac5
  [  ipc
     o  shm.c

Patch

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/ipc/shm.c linux.ac/ipc/shm.c
--- linux.vanilla/ipc/shm.c   Fri Sep 14 22:17:38 2001
+++ linux.ac/ipc/shm.c   Wed Oct 10 01:48:37 2001
@@ -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);
    }
 }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.