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

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

Advertisement

Kernel v2.4.1 /ipc/shm.c

Filename:/ipc/shm.c
Lines Added:3
Lines Deleted:2
Also changed in: (Previous) 2.4.1-pre12  2.4.1-pre11  2.4.1-pre10  2.4.1-pre9  2.4.1-pre8  2.4.1-pre6 
(Following) 2.4.1-ac1  2.4.1-ac2  2.4.1-ac3  2.4.1-ac4  2.4.1-ac5  2.4.1-ac6 

Location
[  2.4.1
  [  ipc
     o  shm.c

Patch

diff -u --recursive --new-file v2.4.0/linux/ipc/shm.c linux/ipc/shm.c
--- v2.4.0/linux/ipc/shm.c   Fri Dec 29 14:21:48 2000
+++ linux/ipc/shm.c   Sun Jan 14 11:22:21 2001
@@ -121,6 +121,7 @@
 {
    shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT;
    shm_rmid (shp->id);
+   shmem_lock(shp->shm_file, 0);
    fput (shp->shm_file);
    kfree (shp);
 }
@@ -467,10 +468,10 @@
       if(err)
          goto out_unlock;
       if(cmd==SHM_LOCK) {
-         shp->shm_file->f_dentry->d_inode->u.shmem_i.locked = 1;
+         shmem_lock(shp->shm_file, 1);
          shp->shm_flags |= SHM_LOCKED;
       } else {
-         shp->shm_file->f_dentry->d_inode->u.shmem_i.locked = 0;
+         shmem_lock(shp->shm_file, 0);
          shp->shm_flags &= ~SHM_LOCKED;
       }
       shm_unlock(shmid);


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