• Home
  • Raw
  • Download

Lines Matching refs:dentry

16 int ovl_setattr(struct dentry *dentry, struct iattr *attr)  in ovl_setattr()  argument
20 struct dentry *upperdentry; in ovl_setattr()
23 err = setattr_prepare(dentry, attr); in ovl_setattr()
27 err = ovl_want_write(dentry); in ovl_setattr()
32 struct inode *realinode = d_inode(ovl_dentry_real(dentry)); in ovl_setattr()
43 err = ovl_copy_up(dentry); in ovl_setattr()
45 err = ovl_copy_up_with_data(dentry); in ovl_setattr()
49 upperdentry = ovl_dentry_upper(dentry); in ovl_setattr()
62 old_cred = ovl_override_creds(dentry->d_sb); in ovl_setattr()
64 ovl_revert_creds(dentry->d_sb, old_cred); in ovl_setattr()
66 ovl_copyattr(upperdentry->d_inode, dentry->d_inode); in ovl_setattr()
73 ovl_drop_write(dentry); in ovl_setattr()
78 static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, in ovl_map_dev_ino() argument
81 bool samefs = ovl_same_sb(dentry->d_sb); in ovl_map_dev_ino()
82 unsigned int xinobits = ovl_xino_bits(dentry->d_sb); in ovl_map_dev_ino()
90 stat->dev = dentry->d_sb->s_dev; in ovl_map_dev_ino()
104 dentry, stat->ino, xinobits); in ovl_map_dev_ino()
109 stat->dev = dentry->d_sb->s_dev; in ovl_map_dev_ino()
115 if (S_ISDIR(dentry->d_inode->i_mode)) { in ovl_map_dev_ino()
125 stat->dev = dentry->d_sb->s_dev; in ovl_map_dev_ino()
126 stat->ino = dentry->d_inode->i_ino; in ovl_map_dev_ino()
144 struct dentry *dentry = path->dentry; in ovl_getattr() local
148 bool is_dir = S_ISDIR(dentry->d_inode->i_mode); in ovl_getattr()
149 bool samefs = ovl_same_sb(dentry->d_sb); in ovl_getattr()
154 metacopy_blocks = ovl_is_metacopy_dentry(dentry); in ovl_getattr()
156 type = ovl_path_real(dentry, &realpath); in ovl_getattr()
157 old_cred = ovl_override_creds(dentry->d_sb); in ovl_getattr()
171 if (!is_dir || samefs || ovl_xino_bits(dentry->d_sb)) { in ovl_getattr()
173 lower_layer = ovl_layer_lower(dentry); in ovl_getattr()
179 ovl_path_lower(dentry, &realpath); in ovl_getattr()
200 if (ovl_test_flag(OVL_INDEX, d_inode(dentry)) || in ovl_getattr()
201 (!ovl_verify_lower(dentry->d_sb) && in ovl_getattr()
203 lower_layer = ovl_layer_lower(dentry); in ovl_getattr()
221 realpath.dentry == ovl_dentry_lowerdata(dentry)) { in ovl_getattr()
235 ovl_path_lowerdata(dentry, &realpath); in ovl_getattr()
244 err = ovl_map_dev_ino(dentry, stat, lower_layer); in ovl_getattr()
262 if (!is_dir && ovl_test_flag(OVL_INDEX, d_inode(dentry))) in ovl_getattr()
263 stat->nlink = dentry->d_inode->i_nlink; in ovl_getattr()
266 ovl_revert_creds(dentry->d_sb, old_cred); in ovl_getattr()
305 static const char *ovl_get_link(struct dentry *dentry, in ovl_get_link() argument
312 if (!dentry) in ovl_get_link()
315 old_cred = ovl_override_creds(dentry->d_sb); in ovl_get_link()
316 p = vfs_get_link(ovl_dentry_real(dentry), done); in ovl_get_link()
317 ovl_revert_creds(dentry->d_sb, old_cred); in ovl_get_link()
327 int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name, in ovl_xattr_set() argument
331 struct dentry *upperdentry = ovl_i_dentry_upper(inode); in ovl_xattr_set()
332 struct dentry *realdentry = upperdentry ?: ovl_dentry_lower(dentry); in ovl_xattr_set()
335 err = ovl_want_write(dentry); in ovl_xattr_set()
346 err = ovl_copy_up(dentry); in ovl_xattr_set()
350 realdentry = ovl_dentry_upper(dentry); in ovl_xattr_set()
353 old_cred = ovl_override_creds(dentry->d_sb); in ovl_xattr_set()
360 ovl_revert_creds(dentry->d_sb, old_cred); in ovl_xattr_set()
366 ovl_drop_write(dentry); in ovl_xattr_set()
371 int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name, in ovl_xattr_get() argument
376 struct dentry *realdentry = in ovl_xattr_get()
377 ovl_i_dentry_upper(inode) ?: ovl_dentry_lower(dentry); in ovl_xattr_get()
379 old_cred = ovl_override_creds(dentry->d_sb); in ovl_xattr_get()
382 ovl_revert_creds(dentry->d_sb, old_cred); in ovl_xattr_get()
397 ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size) in ovl_listxattr() argument
399 struct dentry *realdentry = ovl_dentry_real(dentry); in ovl_listxattr()
405 old_cred = ovl_override_creds(dentry->d_sb); in ovl_listxattr()
407 ovl_revert_creds(dentry->d_sb, old_cred); in ovl_listxattr()
453 .dentry = ovl_upperdentry_dereference(OVL_I(inode)), in ovl_update_time()
456 if (upperpath.dentry) { in ovl_update_time()
458 inode->i_atime = d_inode(upperpath.dentry)->i_atime; in ovl_update_time()
640 static int ovl_set_nlink_common(struct dentry *dentry, in ovl_set_nlink_common() argument
641 struct dentry *realdentry, const char *format) in ovl_set_nlink_common()
643 struct inode *inode = d_inode(dentry); in ovl_set_nlink_common()
654 return ovl_do_setxattr(ovl_dentry_upper(dentry), in ovl_set_nlink_common()
658 int ovl_set_nlink_upper(struct dentry *dentry) in ovl_set_nlink_upper() argument
660 return ovl_set_nlink_common(dentry, ovl_dentry_upper(dentry), "U%+i"); in ovl_set_nlink_upper()
663 int ovl_set_nlink_lower(struct dentry *dentry) in ovl_set_nlink_lower() argument
665 return ovl_set_nlink_common(dentry, ovl_dentry_lower(dentry), "L%+i"); in ovl_set_nlink_lower()
668 unsigned int ovl_get_nlink(struct dentry *lowerdentry, in ovl_get_nlink()
669 struct dentry *upperdentry, in ovl_get_nlink()
729 static bool ovl_verify_inode(struct inode *inode, struct dentry *lowerdentry, in ovl_verify_inode()
730 struct dentry *upperdentry, bool strict) in ovl_verify_inode()
767 struct inode *ovl_lookup_inode(struct super_block *sb, struct dentry *real, in ovl_lookup_inode()
785 bool ovl_lookup_trap_inode(struct super_block *sb, struct dentry *dir) in ovl_lookup_trap_inode()
807 struct inode *ovl_get_trap_inode(struct super_block *sb, struct dentry *dir) in ovl_get_trap_inode()
836 static bool ovl_hash_bylower(struct super_block *sb, struct dentry *upper, in ovl_hash_bylower()
837 struct dentry *lower, struct dentry *index) in ovl_hash_bylower()
878 struct dentry *upperdentry = oip->upperdentry; in ovl_get_inode()
882 struct dentry *lowerdentry = lowerpath ? lowerpath->dentry : NULL; in ovl_get_inode()