Is RCU not safe enough to protect dcache hlist?
Lee
rocklee_104 at outlook.com
Sun Mar 15 22:06:37 EDT 2015
Hi, all:
I am studying the dcache in VFS recently . I found that hlist of dcache
is already protected by RCU in
__d_lookup.Is it necessary for the function -- d_lookup using
sequence lock to protect the hlist again?
struct dentry * d_lookup(struct dentry * parent, struct qstr * name)
{
struct dentry * dentry = NULL;
unsigned long seq;
do {
seq = read_seqbegin(&rename_lock);
dentry = __d_lookup(parent, name);
if (dentry)
break;
} while (read_seqretry(&rename_lock, seq));
return dentry;
}
Thanks
---
Rock Lee
More information about the Kernelnewbies
mailing list