Lines Matching refs:dentry

22 int ovl_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
26 struct ovl_fs *ofs = OVL_FS(dentry->d_sb);
28 struct dentry *upperdentry;
31 err = setattr_prepare(&nop_mnt_idmap, dentry, attr);
41 err = ovl_copy_up(dentry);
43 err = ovl_copy_up_with_data(dentry);
47 upperdentry = ovl_dentry_upper(dentry);
77 err = ovl_want_write(dentry);
82 old_cred = ovl_override_creds(dentry->d_sb);
86 ovl_copyattr(dentry->d_inode);
88 ovl_drop_write(dentry);
98 static void ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid)
100 struct ovl_fs *ofs = OVL_FS(dentry->d_sb);
111 stat->dev = dentry->d_sb->s_dev;
125 stat->dev = dentry->d_sb->s_dev;
129 dentry, stat->ino, xinobits);
134 if (S_ISDIR(dentry->d_inode->i_mode)) {
144 stat->dev = dentry->d_sb->s_dev;
145 stat->ino = dentry->d_inode->i_ino;
160 struct dentry *dentry = path->dentry;
164 struct inode *inode = d_inode(dentry);
170 metacopy_blocks = ovl_is_metacopy_dentry(dentry);
172 type = ovl_path_real(dentry, &realpath);
173 old_cred = ovl_override_creds(dentry->d_sb);
190 if (!is_dir || ovl_same_dev(OVL_FS(dentry->d_sb))) {
192 fsid = ovl_layer_lower(dentry)->fsid;
198 ovl_path_lower(dentry, &realpath);
219 if (ovl_test_flag(OVL_INDEX, d_inode(dentry)) ||
220 (!ovl_verify_lower(dentry->d_sb) &&
222 fsid = ovl_layer_lower(dentry)->fsid;
227 * If we are querying a metacopy dentry and lower
228 * dentry is data dentry, then use the blocks we
234 realpath.dentry == ovl_dentry_lowerdata(dentry)) {
250 ovl_path_lowerdata(dentry, &realpath);
251 if (realpath.dentry) {
264 ovl_map_dev_ino(dentry, stat, fsid);
280 if (!is_dir && ovl_test_flag(OVL_INDEX, d_inode(dentry)))
281 stat->nlink = dentry->d_inode->i_nlink;
326 static const char *ovl_get_link(struct dentry *dentry,
333 if (!dentry)
336 old_cred = ovl_override_creds(dentry->d_sb);
337 p = vfs_get_link(ovl_dentry_real(dentry), done);
401 struct inode *realinode = d_inode(path->dentry);
408 real_acl = vfs_get_acl(idmap, path->dentry, acl_name);
479 static int ovl_set_or_remove_acl(struct dentry *dentry, struct inode *inode,
486 struct ovl_fs *ofs = OVL_FS(dentry->d_sb);
487 struct dentry *upperdentry = ovl_dentry_upper(dentry);
488 struct dentry *realdentry = upperdentry ?: ovl_dentry_lower(dentry);
498 ovl_path_lower(dentry, &realpath);
499 old_cred = ovl_override_creds(dentry->d_sb);
511 err = ovl_copy_up(dentry);
515 realdentry = ovl_dentry_upper(dentry);
518 err = ovl_want_write(dentry);
522 old_cred = ovl_override_creds(dentry->d_sb);
528 ovl_drop_write(dentry);
536 int ovl_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
540 struct inode *inode = d_inode(dentry);
541 struct dentry *workdir = ovl_workdir(dentry);
562 err = ovl_setattr(&nop_mnt_idmap, dentry, &iattr);
567 return ovl_set_or_remove_acl(dentry, inode, acl, type);
577 .dentry = ovl_upperdentry_dereference(OVL_I(inode)),
580 if (upperpath.dentry) {
583 inode_get_atime(d_inode(upperpath.dentry)));
644 return vfs_fileattr_set(mnt_idmap(realpath->mnt), realpath->dentry, fa);
648 struct dentry *dentry, struct fileattr *fa)
650 struct inode *inode = d_inode(dentry);
656 err = ovl_copy_up(dentry);
658 ovl_path_real(dentry, &upperpath);
660 err = ovl_want_write(dentry);
672 err = ovl_set_protattr(inode, upperpath.dentry, fa);
676 ovl_drop_write(dentry);
719 err = vfs_fileattr_get(realpath->dentry, fa);
725 int ovl_fileattr_get(struct dentry *dentry, struct fileattr *fa)
727 struct inode *inode = d_inode(dentry);
732 ovl_path_real(dentry, &realpath);
970 static int ovl_set_nlink_common(struct dentry *dentry,
971 struct dentry *realdentry, const char *format)
973 struct inode *inode = d_inode(dentry);
984 return ovl_setxattr(OVL_FS(inode->i_sb), ovl_dentry_upper(dentry),
988 int ovl_set_nlink_upper(struct dentry *dentry)
990 return ovl_set_nlink_common(dentry, ovl_dentry_upper(dentry), "U%+i");
993 int ovl_set_nlink_lower(struct dentry *dentry)
995 return ovl_set_nlink_common(dentry, ovl_dentry_lower(dentry), "L%+i");
998 unsigned int ovl_get_nlink(struct ovl_fs *ofs, struct dentry *lowerdentry,
999 struct dentry *upperdentry,
1060 static bool ovl_verify_inode(struct inode *inode, struct dentry *lowerdentry,
1061 struct dentry *upperdentry, bool strict)
1065 * checks, so NULL lower/upper in dentry must match NULL lower/upper in
1082 * or hardlinked overlay dentry and lower dentry cannot be followed
1098 struct inode *ovl_lookup_inode(struct super_block *sb, struct dentry *real,
1116 bool ovl_lookup_trap_inode(struct super_block *sb, struct dentry *dir)
1138 struct inode *ovl_get_trap_inode(struct super_block *sb, struct dentry *dir)
1167 static bool ovl_hash_bylower(struct super_block *sb, struct dentry *upper,
1168 struct dentry *lower, bool index)
1210 struct dentry *upperdentry = oip->upperdentry;
1214 struct dentry *lowerdentry = lowerpath ? lowerpath->dentry : NULL;
1216 .dentry = upperdentry ?: lowerdentry,
1245 * match those in the dentry.