diff options
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index e90512ed35a4..17e439138681 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -644,7 +644,7 @@ void shrink_dcache_parent(struct dentry * parent) | |||
644 | * | 644 | * |
645 | * Prune the dentries that are anonymous | 645 | * Prune the dentries that are anonymous |
646 | * | 646 | * |
647 | * parsing d_hash list does not hlist_for_each_rcu() as it | 647 | * parsing d_hash list does not hlist_for_each_entry_rcu() as it |
648 | * done under dcache_lock. | 648 | * done under dcache_lock. |
649 | * | 649 | * |
650 | */ | 650 | */ |
@@ -1043,15 +1043,13 @@ struct dentry * __d_lookup(struct dentry * parent, struct qstr * name) | |||
1043 | struct hlist_head *head = d_hash(parent,hash); | 1043 | struct hlist_head *head = d_hash(parent,hash); |
1044 | struct dentry *found = NULL; | 1044 | struct dentry *found = NULL; |
1045 | struct hlist_node *node; | 1045 | struct hlist_node *node; |
1046 | struct dentry *dentry; | ||
1046 | 1047 | ||
1047 | rcu_read_lock(); | 1048 | rcu_read_lock(); |
1048 | 1049 | ||
1049 | hlist_for_each_rcu(node, head) { | 1050 | hlist_for_each_entry_rcu(dentry, node, head, d_hash) { |
1050 | struct dentry *dentry; | ||
1051 | struct qstr *qstr; | 1051 | struct qstr *qstr; |
1052 | 1052 | ||
1053 | dentry = hlist_entry(node, struct dentry, d_hash); | ||
1054 | |||
1055 | if (dentry->d_name.hash != hash) | 1053 | if (dentry->d_name.hash != hash) |
1056 | continue; | 1054 | continue; |
1057 | if (dentry->d_parent != parent) | 1055 | if (dentry->d_parent != parent) |
@@ -1123,7 +1121,7 @@ int d_validate(struct dentry *dentry, struct dentry *dparent) | |||
1123 | spin_lock(&dcache_lock); | 1121 | spin_lock(&dcache_lock); |
1124 | base = d_hash(dparent, dentry->d_name.hash); | 1122 | base = d_hash(dparent, dentry->d_name.hash); |
1125 | hlist_for_each(lhp,base) { | 1123 | hlist_for_each(lhp,base) { |
1126 | /* hlist_for_each_rcu() not required for d_hash list | 1124 | /* hlist_for_each_entry_rcu() not required for d_hash list |
1127 | * as it is parsed under dcache_lock | 1125 | * as it is parsed under dcache_lock |
1128 | */ | 1126 | */ |
1129 | if (dentry == hlist_entry(lhp, struct dentry, d_hash)) { | 1127 | if (dentry == hlist_entry(lhp, struct dentry, d_hash)) { |