lkml.org 
[lkml]   [2006]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectd_entry delete ( d_delete ) in d_cache.c on linux 2.6.15 and beyond
Hello,

I notice that on versions 2.6.15 and later, the function

void d_delete(struct dentry * dentry)

Implements a mechanism for notifying the deletion of the d_entry.

The implementation assumes that the d_entry has a non-null d_inode pointer
and that seems to be terribly wrong. In other words, how can a
"negative d_entry"
be deleted? Implementation of rename may use dummy dentries (that have d_inode
set to NULL) and that is a problem as well.

Please CC me if you have any comments/feedback on this subject.

Thanks!

-- ff@member.org

PS. For more specific details on the code I'm referring to, see below:

File .../fs/dcache.c

void d_delete(struct dentry * dentry)
{
int isdir = 0;
...
spin_lock(&dcache_lock);
spin_lock(&dentry->d_lock);
isdir = S_ISDIR(dentry->d_inode->i_mode); <======= MUST CHECK d_inode!!!!
if (atomic_read(&dentry->d_count) == 1) {
...
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-02 21:43    [W:0.047 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site