Lines Matching refs:oe

66 static struct dentry *__ovl_dentry_lower(struct ovl_entry *oe)  in __ovl_dentry_lower()  argument
68 return oe->numlower ? oe->lowerstack[0].dentry : NULL; in __ovl_dentry_lower()
73 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_type() local
76 if (oe->__upperdentry) { in ovl_path_type()
83 if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode)) in ovl_path_type()
85 else if (!oe->opaque) in ovl_path_type()
88 if (oe->numlower > 1) in ovl_path_type()
94 static struct dentry *ovl_upperdentry_dereference(struct ovl_entry *oe) in ovl_upperdentry_dereference() argument
96 return lockless_dereference(oe->__upperdentry); in ovl_upperdentry_dereference()
102 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_upper() local
105 path->dentry = ovl_upperdentry_dereference(oe); in ovl_path_upper()
122 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_upper() local
124 return ovl_upperdentry_dereference(oe); in ovl_dentry_upper()
129 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_lower() local
131 return __ovl_dentry_lower(oe); in ovl_dentry_lower()
136 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_real() local
139 realdentry = ovl_upperdentry_dereference(oe); in ovl_dentry_real()
141 realdentry = __ovl_dentry_lower(oe); in ovl_dentry_real()
146 struct dentry *ovl_entry_real(struct ovl_entry *oe, bool *is_upper) in ovl_entry_real() argument
150 realdentry = ovl_upperdentry_dereference(oe); in ovl_entry_real()
154 realdentry = __ovl_dentry_lower(oe); in ovl_entry_real()
162 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dir_cache() local
164 return oe->cache; in ovl_dir_cache()
169 struct ovl_entry *oe = dentry->d_fsdata; in ovl_set_dir_cache() local
171 oe->cache = cache; in ovl_set_dir_cache()
176 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_lower() local
178 *path = oe->numlower ? oe->lowerstack[0] : (struct path) { NULL, NULL }; in ovl_path_lower()
201 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_is_opaque() local
202 return oe->opaque; in ovl_dentry_is_opaque()
207 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_set_opaque() local
208 oe->opaque = opaque; in ovl_dentry_set_opaque()
213 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_update() local
216 WARN_ON(oe->__upperdentry); in ovl_dentry_update()
223 oe->__upperdentry = upperdentry; in ovl_dentry_update()
228 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_version_inc() local
231 oe->version++; in ovl_dentry_version_inc()
236 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_version_get() local
239 return oe->version; in ovl_dentry_version_get()
267 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_release() local
269 if (oe) { in ovl_dentry_release()
272 dput(oe->__upperdentry); in ovl_dentry_release()
273 for (i = 0; i < oe->numlower; i++) in ovl_dentry_release()
274 dput(oe->lowerstack[i].dentry); in ovl_dentry_release()
275 kfree_rcu(oe, rcu); in ovl_dentry_release()
287 struct ovl_entry *oe = kzalloc(size, GFP_KERNEL); in ovl_alloc_entry() local
289 if (oe) in ovl_alloc_entry()
290 oe->numlower = numlower; in ovl_alloc_entry()
292 return oe; in ovl_alloc_entry()
320 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_next() local
326 return oe->numlower ? 1 : -1; in ovl_path_next()
329 BUG_ON(idx > oe->numlower); in ovl_path_next()
330 *path = oe->lowerstack[idx - 1]; in ovl_path_next()
332 return (idx < oe->numlower) ? idx + 1 : -1; in ovl_path_next()
338 struct ovl_entry *oe; in ovl_lookup() local
427 oe = ovl_alloc_entry(ctr); in ovl_lookup()
429 if (!oe) in ovl_lookup()
439 oe); in ovl_lookup()
445 oe->opaque = upperopaque; in ovl_lookup()
446 oe->__upperdentry = upperdentry; in ovl_lookup()
447 memcpy(oe->lowerstack, stack, sizeof(struct path) * ctr); in ovl_lookup()
449 dentry->d_fsdata = oe; in ovl_lookup()
455 kfree(oe); in ovl_lookup()
827 struct ovl_entry *oe; in ovl_fill_super() local
970 oe = ovl_alloc_entry(numlower); in ovl_fill_super()
971 if (!oe) in ovl_fill_super()
974 root_dentry = d_make_root(ovl_new_inode(sb, S_IFDIR, oe)); in ovl_fill_super()
984 oe->__upperdentry = upperpath.dentry; in ovl_fill_super()
986 oe->lowerstack[i].dentry = stack[i].dentry; in ovl_fill_super()
987 oe->lowerstack[i].mnt = ufs->lower_mnt[i]; in ovl_fill_super()
991 root_dentry->d_fsdata = oe; in ovl_fill_super()
1004 kfree(oe); in ovl_fill_super()