• Home
  • Raw
  • Download

Lines Matching refs:dentry

41 	struct dentry *workdir;
53 struct dentry *__upperdentry;
68 static struct dentry *__ovl_dentry_lower(struct ovl_entry *oe) in __ovl_dentry_lower()
70 return oe->numlower ? oe->lowerstack[0].dentry : NULL; in __ovl_dentry_lower()
73 enum ovl_path_type ovl_path_type(struct dentry *dentry) in ovl_path_type() argument
75 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_type()
85 if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode)) in ovl_path_type()
96 static struct dentry *ovl_upperdentry_dereference(struct ovl_entry *oe) in ovl_upperdentry_dereference()
101 void ovl_path_upper(struct dentry *dentry, struct path *path) in ovl_path_upper() argument
103 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_path_upper()
104 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_upper()
107 path->dentry = ovl_upperdentry_dereference(oe); in ovl_path_upper()
110 enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path) in ovl_path_real() argument
112 enum ovl_path_type type = ovl_path_type(dentry); in ovl_path_real()
115 ovl_path_lower(dentry, path); in ovl_path_real()
117 ovl_path_upper(dentry, path); in ovl_path_real()
122 struct dentry *ovl_dentry_upper(struct dentry *dentry) in ovl_dentry_upper() argument
124 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_upper()
129 struct dentry *ovl_dentry_lower(struct dentry *dentry) in ovl_dentry_lower() argument
131 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_lower()
136 struct dentry *ovl_dentry_real(struct dentry *dentry) in ovl_dentry_real() argument
138 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_real()
139 struct dentry *realdentry; in ovl_dentry_real()
148 struct dentry *ovl_entry_real(struct ovl_entry *oe, bool *is_upper) in ovl_entry_real()
150 struct dentry *realdentry; in ovl_entry_real()
162 struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry) in ovl_dir_cache() argument
164 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dir_cache()
169 void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache) in ovl_set_dir_cache() argument
171 struct ovl_entry *oe = dentry->d_fsdata; in ovl_set_dir_cache()
176 void ovl_path_lower(struct dentry *dentry, struct path *path) in ovl_path_lower() argument
178 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_lower()
183 int ovl_want_write(struct dentry *dentry) in ovl_want_write() argument
185 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_want_write()
189 void ovl_drop_write(struct dentry *dentry) in ovl_drop_write() argument
191 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_drop_write()
195 struct dentry *ovl_workdir(struct dentry *dentry) in ovl_workdir() argument
197 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_workdir()
201 bool ovl_dentry_is_opaque(struct dentry *dentry) in ovl_dentry_is_opaque() argument
203 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_is_opaque()
207 void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque) in ovl_dentry_set_opaque() argument
209 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_set_opaque()
213 void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry) in ovl_dentry_update() argument
215 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_update()
228 void ovl_dentry_version_inc(struct dentry *dentry) in ovl_dentry_version_inc() argument
230 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_version_inc()
232 WARN_ON(!mutex_is_locked(&dentry->d_inode->i_mutex)); in ovl_dentry_version_inc()
236 u64 ovl_dentry_version_get(struct dentry *dentry) in ovl_dentry_version_get() argument
238 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_version_get()
240 WARN_ON(!mutex_is_locked(&dentry->d_inode->i_mutex)); in ovl_dentry_version_get()
244 bool ovl_is_whiteout(struct dentry *dentry) in ovl_is_whiteout() argument
246 struct inode *inode = dentry->d_inode; in ovl_is_whiteout()
258 static bool ovl_is_opaquedir(struct dentry *dentry) in ovl_is_opaquedir() argument
262 struct inode *inode = dentry->d_inode; in ovl_is_opaquedir()
267 res = inode->i_op->getxattr(dentry, OVL_XATTR_OPAQUE, &val, 1); in ovl_is_opaquedir()
274 static void ovl_dentry_release(struct dentry *dentry) in ovl_dentry_release() argument
276 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_release()
283 dput(oe->lowerstack[i].dentry); in ovl_dentry_release()
288 static struct dentry *ovl_d_real(struct dentry *dentry, struct inode *inode) in ovl_d_real() argument
290 struct dentry *real; in ovl_d_real()
292 if (d_is_dir(dentry)) { in ovl_d_real()
293 if (!inode || inode == d_inode(dentry)) in ovl_d_real()
294 return dentry; in ovl_d_real()
298 real = ovl_dentry_upper(dentry); in ovl_d_real()
302 real = ovl_dentry_lower(dentry); in ovl_d_real()
314 WARN(1, "ovl_d_real(%pd4, %s:%lu\n): real dentry not found\n", dentry, in ovl_d_real()
316 return dentry; in ovl_d_real()
319 static int ovl_dentry_revalidate(struct dentry *dentry, unsigned int flags) in ovl_dentry_revalidate() argument
321 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_revalidate()
326 struct dentry *d = oe->lowerstack[i].dentry; in ovl_dentry_revalidate()
342 static int ovl_dentry_weak_revalidate(struct dentry *dentry, unsigned int flags) in ovl_dentry_weak_revalidate() argument
344 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_weak_revalidate()
349 struct dentry *d = oe->lowerstack[i].dentry; in ovl_dentry_weak_revalidate()
385 static bool ovl_dentry_remote(struct dentry *dentry) in ovl_dentry_remote() argument
387 return dentry->d_flags & in ovl_dentry_remote()
392 static bool ovl_dentry_weird(struct dentry *dentry) in ovl_dentry_weird() argument
394 return dentry->d_flags & (DCACHE_NEED_AUTOMOUNT | in ovl_dentry_weird()
400 static inline struct dentry *ovl_lookup_real(struct dentry *dir, in ovl_lookup_real()
403 struct dentry *dentry; in ovl_lookup_real() local
406 dentry = lookup_one_len(name->name, dir, name->len); in ovl_lookup_real()
409 if (IS_ERR(dentry)) { in ovl_lookup_real()
410 if (PTR_ERR(dentry) == -ENOENT) in ovl_lookup_real()
411 dentry = NULL; in ovl_lookup_real()
412 } else if (!dentry->d_inode) { in ovl_lookup_real()
413 dput(dentry); in ovl_lookup_real()
414 dentry = NULL; in ovl_lookup_real()
415 } else if (ovl_dentry_weird(dentry)) { in ovl_lookup_real()
416 dput(dentry); in ovl_lookup_real()
418 dentry = ERR_PTR(-EREMOTE); in ovl_lookup_real()
420 return dentry; in ovl_lookup_real()
427 int ovl_path_next(int idx, struct dentry *dentry, struct path *path) in ovl_path_next() argument
429 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_next()
433 ovl_path_upper(dentry, path); in ovl_path_next()
434 if (path->dentry) in ovl_path_next()
444 struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, in ovl_lookup() argument
448 struct ovl_entry *poe = dentry->d_parent->d_fsdata; in ovl_lookup()
450 struct dentry *upperdir, *upperdentry = NULL; in ovl_lookup()
454 struct dentry *this, *prev = NULL; in ovl_lookup()
460 this = ovl_lookup_real(upperdir, &dentry->d_name); in ovl_lookup()
493 this = ovl_lookup_real(lowerpath.dentry, &dentry->d_name); in ovl_lookup()
533 stack[ctr].dentry = this; in ovl_lookup()
547 struct dentry *realdentry; in ovl_lookup()
549 realdentry = upperdentry ? upperdentry : stack[0].dentry; in ovl_lookup()
552 inode = ovl_new_inode(dentry->d_sb, realdentry->d_inode->i_mode, in ovl_lookup()
563 dentry->d_fsdata = oe; in ovl_lookup()
564 d_add(dentry, inode); in ovl_lookup()
572 dput(stack[i].dentry); in ovl_lookup()
611 static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf) in ovl_statfs() argument
613 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_statfs()
614 struct dentry *root_dentry = dentry->d_sb->s_root; in ovl_statfs()
635 static int ovl_show_options(struct seq_file *m, struct dentry *dentry) in ovl_show_options() argument
637 struct super_block *sb = dentry->d_sb; in ovl_show_options()
755 static struct dentry *ovl_workdir_create(struct vfsmount *mnt, in ovl_workdir_create()
756 struct dentry *dentry) in ovl_workdir_create() argument
758 struct inode *dir = dentry->d_inode; in ovl_workdir_create()
759 struct dentry *work; in ovl_workdir_create()
769 work = lookup_one_len(OVL_WORKDIR_NAME, dentry, in ovl_workdir_create()
850 if (ovl_dentry_weird(path->dentry)) { in ovl_mount_dir_noesc()
854 if (!S_ISDIR(path->dentry->d_inode->i_mode)) { in ovl_mount_dir_noesc()
876 if (ovl_dentry_remote(path->dentry)) { in ovl_mount_dir()
905 if (ovl_dentry_remote(path->dentry)) in ovl_lower_dir()
917 static bool ovl_workdir_ok(struct dentry *workdir, struct dentry *upperdir) in ovl_workdir_ok()
952 struct dentry *root_dentry; in ovl_fill_super()
1007 if (!ovl_workdir_ok(workpath.dentry, upperpath.dentry)) { in ovl_fill_super()
1059 ufs->workdir = ovl_workdir_create(ufs->upper_mnt, workpath.dentry); in ovl_fill_super()
1139 oe->__upperdentry = upperpath.dentry; in ovl_fill_super()
1141 oe->lowerstack[i].dentry = stack[i].dentry; in ovl_fill_super()
1188 static struct dentry *ovl_mount(struct file_system_type *fs_type, int flags, in ovl_mount()