aboutsummaryrefslogtreecommitdiffstats
path: root/fs/libfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-10-26 19:19:16 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-03 15:20:29 -0500
commit946e51f2bf37f1656916eb75bd0742ba33983c28 (patch)
treee3d2672edeec1117ceda1e8e195eaa8d1c0f5135 /fs/libfs.c
parenta7400222e3eb7d5ce3820d2234905bbeafabd171 (diff)
move d_rcu from overlapping d_child to overlapping d_alias
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r--fs/libfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/libfs.c b/fs/libfs.c
index 171d2846f2a3..005843ce5dbd 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -114,18 +114,18 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
114 114
115 spin_lock(&dentry->d_lock); 115 spin_lock(&dentry->d_lock);
116 /* d_lock not required for cursor */ 116 /* d_lock not required for cursor */
117 list_del(&cursor->d_u.d_child); 117 list_del(&cursor->d_child);
118 p = dentry->d_subdirs.next; 118 p = dentry->d_subdirs.next;
119 while (n && p != &dentry->d_subdirs) { 119 while (n && p != &dentry->d_subdirs) {
120 struct dentry *next; 120 struct dentry *next;
121 next = list_entry(p, struct dentry, d_u.d_child); 121 next = list_entry(p, struct dentry, d_child);
122 spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); 122 spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED);
123 if (simple_positive(next)) 123 if (simple_positive(next))
124 n--; 124 n--;
125 spin_unlock(&next->d_lock); 125 spin_unlock(&next->d_lock);
126 p = p->next; 126 p = p->next;
127 } 127 }
128 list_add_tail(&cursor->d_u.d_child, p); 128 list_add_tail(&cursor->d_child, p);
129 spin_unlock(&dentry->d_lock); 129 spin_unlock(&dentry->d_lock);
130 } 130 }
131 } 131 }
@@ -150,7 +150,7 @@ int dcache_readdir(struct file *file, struct dir_context *ctx)
150{ 150{
151 struct dentry *dentry = file->f_path.dentry; 151 struct dentry *dentry = file->f_path.dentry;
152 struct dentry *cursor = file->private_data; 152 struct dentry *cursor = file->private_data;
153 struct list_head *p, *q = &cursor->d_u.d_child; 153 struct list_head *p, *q = &cursor->d_child;
154 154
155 if (!dir_emit_dots(file, ctx)) 155 if (!dir_emit_dots(file, ctx))
156 return 0; 156 return 0;
@@ -159,7 +159,7 @@ int dcache_readdir(struct file *file, struct dir_context *ctx)
159 list_move(q, &dentry->d_subdirs); 159 list_move(q, &dentry->d_subdirs);
160 160
161 for (p = q->next; p != &dentry->d_subdirs; p = p->next) { 161 for (p = q->next; p != &dentry->d_subdirs; p = p->next) {
162 struct dentry *next = list_entry(p, struct dentry, d_u.d_child); 162 struct dentry *next = list_entry(p, struct dentry, d_child);
163 spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); 163 spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED);
164 if (!simple_positive(next)) { 164 if (!simple_positive(next)) {
165 spin_unlock(&next->d_lock); 165 spin_unlock(&next->d_lock);
@@ -287,7 +287,7 @@ int simple_empty(struct dentry *dentry)
287 int ret = 0; 287 int ret = 0;
288 288
289 spin_lock(&dentry->d_lock); 289 spin_lock(&dentry->d_lock);
290 list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) { 290 list_for_each_entry(child, &dentry->d_subdirs, d_child) {
291 spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED); 291 spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED);
292 if (simple_positive(child)) { 292 if (simple_positive(child)) {
293 spin_unlock(&child->d_lock); 293 spin_unlock(&child->d_lock);