Lines Matching refs:dentry
125 static inline int ovl_do_rmdir(struct inode *dir, struct dentry *dentry) in ovl_do_rmdir() argument
127 int err = vfs_rmdir(&init_user_ns, dir, dentry); in ovl_do_rmdir()
129 pr_debug("rmdir(%pd2) = %i\n", dentry, err); in ovl_do_rmdir()
133 static inline int ovl_do_unlink(struct inode *dir, struct dentry *dentry) in ovl_do_unlink() argument
135 int err = vfs_unlink(&init_user_ns, dir, dentry, NULL); in ovl_do_unlink()
137 pr_debug("unlink(%pd2) = %i\n", dentry, err); in ovl_do_unlink()
141 static inline int ovl_do_link(struct dentry *old_dentry, struct inode *dir, in ovl_do_link()
142 struct dentry *new_dentry) in ovl_do_link()
150 static inline int ovl_do_create(struct inode *dir, struct dentry *dentry, in ovl_do_create() argument
153 int err = vfs_create(&init_user_ns, dir, dentry, mode, true); in ovl_do_create()
155 pr_debug("create(%pd2, 0%o) = %i\n", dentry, mode, err); in ovl_do_create()
159 static inline int ovl_do_mkdir(struct inode *dir, struct dentry *dentry, in ovl_do_mkdir() argument
162 int err = vfs_mkdir(&init_user_ns, dir, dentry, mode); in ovl_do_mkdir()
163 pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, err); in ovl_do_mkdir()
167 static inline int ovl_do_mknod(struct inode *dir, struct dentry *dentry, in ovl_do_mknod() argument
170 int err = vfs_mknod(&init_user_ns, dir, dentry, mode, dev); in ovl_do_mknod()
172 pr_debug("mknod(%pd2, 0%o, 0%o) = %i\n", dentry, mode, dev, err); in ovl_do_mknod()
176 static inline int ovl_do_symlink(struct inode *dir, struct dentry *dentry, in ovl_do_symlink() argument
179 int err = vfs_symlink(&init_user_ns, dir, dentry, oldname); in ovl_do_symlink()
181 pr_debug("symlink(\"%s\", %pd2) = %i\n", oldname, dentry, err); in ovl_do_symlink()
185 static inline ssize_t ovl_do_getxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_getxattr() argument
190 int err = vfs_getxattr(&init_user_ns, dentry, name, value, size); in ovl_do_getxattr()
194 dentry, name, min(len, 48), value, size, err); in ovl_do_getxattr()
198 static inline int ovl_do_setxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_setxattr() argument
203 int err = vfs_setxattr(&init_user_ns, dentry, name, value, size, 0); in ovl_do_setxattr()
205 dentry, name, min((int)size, 48), value, size, err); in ovl_do_setxattr()
209 static inline int ovl_do_removexattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_removexattr() argument
213 int err = vfs_removexattr(&init_user_ns, dentry, name); in ovl_do_removexattr()
214 pr_debug("removexattr(%pd2, \"%s\") = %i\n", dentry, name, err); in ovl_do_removexattr()
218 static inline int ovl_do_rename(struct inode *olddir, struct dentry *olddentry, in ovl_do_rename()
219 struct inode *newdir, struct dentry *newdentry, in ovl_do_rename()
242 static inline int ovl_do_whiteout(struct inode *dir, struct dentry *dentry) in ovl_do_whiteout() argument
244 int err = vfs_whiteout(&init_user_ns, dir, dentry); in ovl_do_whiteout()
245 pr_debug("whiteout(%pd2) = %i\n", dentry, err); in ovl_do_whiteout()
249 static inline struct dentry *ovl_do_tmpfile(struct dentry *dentry, umode_t mode) in ovl_do_tmpfile() argument
251 struct dentry *ret = vfs_tmpfile(&init_user_ns, dentry, mode, 0); in ovl_do_tmpfile()
254 pr_debug("tmpfile(%pd2, 0%o) = %i\n", dentry, mode, err); in ovl_do_tmpfile()
279 int ovl_want_write(struct dentry *dentry);
280 void ovl_drop_write(struct dentry *dentry);
281 struct dentry *ovl_workdir(struct dentry *dentry);
284 struct dentry *ovl_indexdir(struct super_block *sb);
288 bool ovl_dentry_remote(struct dentry *dentry);
289 void ovl_dentry_update_reval(struct dentry *dentry, struct dentry *upperdentry,
291 bool ovl_dentry_weird(struct dentry *dentry);
292 enum ovl_path_type ovl_path_type(struct dentry *dentry);
293 void ovl_path_upper(struct dentry *dentry, struct path *path);
294 void ovl_path_lower(struct dentry *dentry, struct path *path);
295 void ovl_path_lowerdata(struct dentry *dentry, struct path *path);
296 enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path);
297 struct dentry *ovl_dentry_upper(struct dentry *dentry);
298 struct dentry *ovl_dentry_lower(struct dentry *dentry);
299 struct dentry *ovl_dentry_lowerdata(struct dentry *dentry);
300 const struct ovl_layer *ovl_layer_lower(struct dentry *dentry);
301 struct dentry *ovl_dentry_real(struct dentry *dentry);
302 struct dentry *ovl_i_dentry_upper(struct inode *inode);
310 void ovl_dentry_set_flag(unsigned long flag, struct dentry *dentry);
311 void ovl_dentry_clear_flag(unsigned long flag, struct dentry *dentry);
312 bool ovl_dentry_test_flag(unsigned long flag, struct dentry *dentry);
313 bool ovl_dentry_is_opaque(struct dentry *dentry);
314 bool ovl_dentry_is_whiteout(struct dentry *dentry);
315 void ovl_dentry_set_opaque(struct dentry *dentry);
316 bool ovl_dentry_has_upper_alias(struct dentry *dentry);
317 void ovl_dentry_set_upper_alias(struct dentry *dentry);
318 bool ovl_dentry_needs_data_copy_up(struct dentry *dentry, int flags);
319 bool ovl_dentry_needs_data_copy_up_locked(struct dentry *dentry, int flags);
323 const char *ovl_dentry_get_redirect(struct dentry *dentry);
324 void ovl_dentry_set_redirect(struct dentry *dentry, const char *redirect);
325 void ovl_inode_update(struct inode *inode, struct dentry *upperdentry);
326 void ovl_dir_modified(struct dentry *dentry, bool impurity);
327 u64 ovl_dentry_version_get(struct dentry *dentry);
328 bool ovl_is_whiteout(struct dentry *dentry);
330 int ovl_copy_up_start(struct dentry *dentry, int flags);
331 void ovl_copy_up_end(struct dentry *dentry);
332 bool ovl_already_copied_up(struct dentry *dentry, int flags);
333 bool ovl_check_origin_xattr(struct ovl_fs *ofs, struct dentry *dentry);
334 bool ovl_check_dir_xattr(struct super_block *sb, struct dentry *dentry,
336 int ovl_check_setxattr(struct ovl_fs *ofs, struct dentry *upperdentry,
339 int ovl_set_impure(struct dentry *dentry, struct dentry *upperdentry);
340 bool ovl_inuse_trylock(struct dentry *dentry);
341 void ovl_inuse_unlock(struct dentry *dentry);
342 bool ovl_is_inuse(struct dentry *dentry);
343 bool ovl_need_index(struct dentry *dentry);
344 int ovl_nlink_start(struct dentry *dentry);
345 void ovl_nlink_end(struct dentry *dentry);
346 int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *upperdir);
347 int ovl_check_metacopy_xattr(struct ovl_fs *ofs, struct dentry *dentry);
348 bool ovl_is_metacopy_dentry(struct dentry *dentry);
349 char *ovl_get_redirect_xattr(struct ovl_fs *ofs, struct dentry *dentry,
369 struct dentry *dentry) in ovl_is_impuredir() argument
371 return ovl_check_dir_xattr(sb, dentry, OVL_XATTR_IMPURE); in ovl_is_impuredir()
428 struct dentry *ovl_decode_real_fh(struct ovl_fs *ofs, struct ovl_fh *fh,
431 struct dentry *upperdentry, struct ovl_path **stackp);
432 int ovl_verify_set_fh(struct ovl_fs *ofs, struct dentry *dentry,
433 enum ovl_xattr ox, struct dentry *real, bool is_upper,
435 struct dentry *ovl_index_upper(struct ovl_fs *ofs, struct dentry *index);
436 int ovl_verify_index(struct ovl_fs *ofs, struct dentry *index);
437 int ovl_get_index_name(struct ovl_fs *ofs, struct dentry *origin,
439 struct dentry *ovl_get_index_fh(struct ovl_fs *ofs, struct ovl_fh *fh);
440 struct dentry *ovl_lookup_index(struct ovl_fs *ofs, struct dentry *upper,
441 struct dentry *origin, bool verify);
442 int ovl_path_next(int idx, struct dentry *dentry, struct path *path);
443 struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
445 bool ovl_lower_positive(struct dentry *dentry);
447 static inline int ovl_verify_origin(struct ovl_fs *ofs, struct dentry *upper, in ovl_verify_origin()
448 struct dentry *origin, bool set) in ovl_verify_origin()
454 static inline int ovl_verify_upper(struct ovl_fs *ofs, struct dentry *index, in ovl_verify_upper()
455 struct dentry *upper, bool set) in ovl_verify_upper()
463 int ovl_check_empty_dir(struct dentry *dentry, struct list_head *list);
464 void ovl_cleanup_whiteouts(struct dentry *upper, struct list_head *list);
469 struct dentry *dentry, int level);
479 static inline bool ovl_dir_is_real(struct dentry *dir) in ovl_dir_is_real()
485 int ovl_set_nlink_upper(struct dentry *dentry);
486 int ovl_set_nlink_lower(struct dentry *dentry);
487 unsigned int ovl_get_nlink(struct ovl_fs *ofs, struct dentry *lowerdentry,
488 struct dentry *upperdentry,
490 int ovl_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
496 int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name,
498 int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name,
500 ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size);
507 struct dentry *upperdentry;
512 struct dentry *lowerdata;
517 struct inode *ovl_lookup_inode(struct super_block *sb, struct dentry *real,
519 bool ovl_lookup_trap_inode(struct super_block *sb, struct dentry *dir);
520 struct inode *ovl_get_trap_inode(struct super_block *sb, struct dentry *dir);
549 void ovl_check_protattr(struct inode *inode, struct dentry *upper);
550 int ovl_set_protattr(struct inode *inode, struct dentry *upper,
563 struct dentry *dentry);
568 struct dentry *hardlink;
573 int ovl_mkdir_real(struct inode *dir, struct dentry **newdentry, umode_t mode);
574 struct dentry *ovl_create_real(struct inode *dir, struct dentry *newdentry,
576 int ovl_cleanup(struct inode *dir, struct dentry *dentry);
577 struct dentry *ovl_lookup_temp(struct dentry *workdir);
578 struct dentry *ovl_create_temp(struct dentry *workdir, struct ovl_cattr *attr);
586 int ovl_fileattr_get(struct dentry *dentry, struct fileattr *fa);
588 struct dentry *dentry, struct fileattr *fa);
591 int ovl_copy_up(struct dentry *dentry);
592 int ovl_copy_up_with_data(struct dentry *dentry);
593 int ovl_maybe_copy_up(struct dentry *dentry, int flags);
594 int ovl_copy_xattr(struct super_block *sb, struct dentry *old,
595 struct dentry *new);
596 int ovl_set_attr(struct dentry *upper, struct kstat *stat);
597 struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct dentry *real,
599 int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower,
600 struct dentry *upper);