Messages in this thread Patch in this message |  | | | Subject | patchlet for false negative dentries in shm fs | | From | Christoph Rohland <> | | Date | 18 Mar 2000 11:08:21 +0100 |
| |
Hi Linus,
the following patch prevents false negative dentries when we reuse a shm id.
It should apply to any version.
Greetings Christoph
-- --- make2-4/ipc/shm.c~ Sat Mar 18 10:07:14 2000 +++ make2-4/ipc/shm.c Sat Mar 18 10:46:04 2000 @@ -518,7 +518,15 @@ shm_unlock (inode->i_ino); up (&shm_ids.sem); inode->i_nlink -= 1; - d_delete (dent); + /* + * If it's a reserved name we have to drop the dentry instead + * of creating a negative dentry + */ + if (dent->d_name.len == SHM_FMT_LEN && + memcmp (SHM_FMT, dent->d_name.name, SHM_FMT_LEN - 8) == 0) + d_drop (dent); + else + d_delete (dent); return 0; } |  |