lkml.org 
[lkml]   [2000]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectpatchlet for false negative dentries in shm fs
From
Date
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;
}
\
 
 \ /
  Last update: 2005-03-22 13:57    [from the cache]
©2003-2011 Jasper Spaans