Lines Matching refs:dentry

41 	struct dentry *workdir;
51 struct dentry *__upperdentry;
66 static struct dentry *__ovl_dentry_lower(struct ovl_entry *oe) in __ovl_dentry_lower()
68 return oe->numlower ? oe->lowerstack[0].dentry : NULL; in __ovl_dentry_lower()
71 enum ovl_path_type ovl_path_type(struct dentry *dentry) in ovl_path_type() argument
73 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_type()
83 if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode)) in ovl_path_type()
94 static struct dentry *ovl_upperdentry_dereference(struct ovl_entry *oe) in ovl_upperdentry_dereference()
99 void ovl_path_upper(struct dentry *dentry, struct path *path) in ovl_path_upper() argument
101 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_path_upper()
102 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_upper()
105 path->dentry = ovl_upperdentry_dereference(oe); in ovl_path_upper()
108 enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path) in ovl_path_real() argument
110 enum ovl_path_type type = ovl_path_type(dentry); in ovl_path_real()
113 ovl_path_lower(dentry, path); in ovl_path_real()
115 ovl_path_upper(dentry, path); in ovl_path_real()
120 struct dentry *ovl_dentry_upper(struct dentry *dentry) in ovl_dentry_upper() argument
122 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_upper()
127 struct dentry *ovl_dentry_lower(struct dentry *dentry) in ovl_dentry_lower() argument
129 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_lower()
134 struct dentry *ovl_dentry_real(struct dentry *dentry) in ovl_dentry_real() argument
136 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_real()
137 struct dentry *realdentry; in ovl_dentry_real()
146 struct dentry *ovl_entry_real(struct ovl_entry *oe, bool *is_upper) in ovl_entry_real()
148 struct dentry *realdentry; in ovl_entry_real()
160 struct ovl_dir_cache *ovl_dir_cache(struct dentry *dentry) in ovl_dir_cache() argument
162 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dir_cache()
167 void ovl_set_dir_cache(struct dentry *dentry, struct ovl_dir_cache *cache) in ovl_set_dir_cache() argument
169 struct ovl_entry *oe = dentry->d_fsdata; in ovl_set_dir_cache()
174 void ovl_path_lower(struct dentry *dentry, struct path *path) in ovl_path_lower() argument
176 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_lower()
181 int ovl_want_write(struct dentry *dentry) in ovl_want_write() argument
183 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_want_write()
187 void ovl_drop_write(struct dentry *dentry) in ovl_drop_write() argument
189 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_drop_write()
193 struct dentry *ovl_workdir(struct dentry *dentry) in ovl_workdir() argument
195 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_workdir()
199 bool ovl_dentry_is_opaque(struct dentry *dentry) in ovl_dentry_is_opaque() argument
201 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_is_opaque()
205 void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque) in ovl_dentry_set_opaque() argument
207 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_set_opaque()
211 void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry) in ovl_dentry_update() argument
213 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_update()
226 void ovl_dentry_version_inc(struct dentry *dentry) in ovl_dentry_version_inc() argument
228 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_version_inc()
230 WARN_ON(!mutex_is_locked(&dentry->d_inode->i_mutex)); in ovl_dentry_version_inc()
234 u64 ovl_dentry_version_get(struct dentry *dentry) in ovl_dentry_version_get() argument
236 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_version_get()
238 WARN_ON(!mutex_is_locked(&dentry->d_inode->i_mutex)); in ovl_dentry_version_get()
242 bool ovl_is_whiteout(struct dentry *dentry) in ovl_is_whiteout() argument
244 struct inode *inode = dentry->d_inode; in ovl_is_whiteout()
249 static bool ovl_is_opaquedir(struct dentry *dentry) in ovl_is_opaquedir() argument
253 struct inode *inode = dentry->d_inode; in ovl_is_opaquedir()
258 res = inode->i_op->getxattr(dentry, OVL_XATTR_OPAQUE, &val, 1); in ovl_is_opaquedir()
265 static void ovl_dentry_release(struct dentry *dentry) in ovl_dentry_release() argument
267 struct ovl_entry *oe = dentry->d_fsdata; in ovl_dentry_release()
274 dput(oe->lowerstack[i].dentry); in ovl_dentry_release()
295 static inline struct dentry *ovl_lookup_real(struct dentry *dir, in ovl_lookup_real()
298 struct dentry *dentry; in ovl_lookup_real() local
301 dentry = lookup_one_len(name->name, dir, name->len); in ovl_lookup_real()
304 if (IS_ERR(dentry)) { in ovl_lookup_real()
305 if (PTR_ERR(dentry) == -ENOENT) in ovl_lookup_real()
306 dentry = NULL; in ovl_lookup_real()
307 } else if (!dentry->d_inode) { in ovl_lookup_real()
308 dput(dentry); in ovl_lookup_real()
309 dentry = NULL; in ovl_lookup_real()
311 return dentry; in ovl_lookup_real()
318 int ovl_path_next(int idx, struct dentry *dentry, struct path *path) in ovl_path_next() argument
320 struct ovl_entry *oe = dentry->d_fsdata; in ovl_path_next()
324 ovl_path_upper(dentry, path); in ovl_path_next()
325 if (path->dentry) in ovl_path_next()
335 struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, in ovl_lookup() argument
339 struct ovl_entry *poe = dentry->d_parent->d_fsdata; in ovl_lookup()
341 struct dentry *upperdir, *upperdentry = NULL; in ovl_lookup()
345 struct dentry *this, *prev = NULL; in ovl_lookup()
351 this = ovl_lookup_real(upperdir, &dentry->d_name); in ovl_lookup()
379 this = ovl_lookup_real(lowerpath.dentry, &dentry->d_name); in ovl_lookup()
419 stack[ctr].dentry = this; in ovl_lookup()
433 struct dentry *realdentry; in ovl_lookup()
435 realdentry = upperdentry ? upperdentry : stack[0].dentry; in ovl_lookup()
438 inode = ovl_new_inode(dentry->d_sb, realdentry->d_inode->i_mode, in ovl_lookup()
449 dentry->d_fsdata = oe; in ovl_lookup()
450 d_add(dentry, inode); in ovl_lookup()
458 dput(stack[i].dentry); in ovl_lookup()
496 static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf) in ovl_statfs() argument
498 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_statfs()
499 struct dentry *root_dentry = dentry->d_sb->s_root; in ovl_statfs()
520 static int ovl_show_options(struct seq_file *m, struct dentry *dentry) in ovl_show_options() argument
522 struct super_block *sb = dentry->d_sb; in ovl_show_options()
640 static struct dentry *ovl_workdir_create(struct vfsmount *mnt, in ovl_workdir_create()
641 struct dentry *dentry) in ovl_workdir_create() argument
643 struct inode *dir = dentry->d_inode; in ovl_workdir_create()
644 struct dentry *work; in ovl_workdir_create()
654 work = lookup_one_len(OVL_WORKDIR_NAME, dentry, in ovl_workdir_create()
702 static bool ovl_is_allowed_fs_type(struct dentry *root) in ovl_is_allowed_fs_type()
735 if (!ovl_is_allowed_fs_type(path->dentry)) { in ovl_mount_dir_noesc()
739 if (!S_ISDIR(path->dentry->d_inode->i_mode)) { in ovl_mount_dir_noesc()
791 static bool ovl_workdir_ok(struct dentry *workdir, struct dentry *upperdir) in ovl_workdir_ok()
826 struct dentry *root_dentry; in ovl_fill_super()
880 if (!ovl_workdir_ok(workpath.dentry, upperpath.dentry)) { in ovl_fill_super()
931 ufs->workdir = ovl_workdir_create(ufs->upper_mnt, workpath.dentry); 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()
1031 static struct dentry *ovl_mount(struct file_system_type *fs_type, int flags, in ovl_mount()