| Kernel v2.4.1-pre9 /ipc/shm.c |
|---|
 2.4.1-pre9
 ipc
 shm.c
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);
|