diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 17:50:33 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 17:50:33 -0800 |
| commit | 6aea16664696367eaab3ec2c00922c942a601073 (patch) | |
| tree | 099508db9bf60b1e12440da82fb8f35899359cf7 /ipc | |
| parent | 448ba078f486e18d82975e86e50bb1fee82fb5f2 (diff) | |
v2.4.0.3 -> v2.4.0.4
- ReiserFS merge
- fix DRM R128/AGP dependency
Diffstat (limited to 'ipc')
| -rw-r--r-- | ipc/shm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipc/shm.c b/ipc/shm.c index b1c0b96c267b..71e22cd58d29 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -121,6 +121,7 @@ static void shm_destroy (struct shmid_kernel *shp) { 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 @@ asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds *buf) 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); |
