Lines Matching refs:upper
232 static int ovl_set_opaque_xerr(struct dentry *dentry, struct dentry *upper, in ovl_set_opaque_xerr() argument
238 err = ovl_check_setxattr(ofs, upper, OVL_XATTR_OPAQUE, "y", 1, xerr); in ovl_set_opaque_xerr()
369 struct dentry *upper; in ovl_clear_empty() local
390 upper = upperpath.dentry; in ovl_clear_empty()
391 if (upper->d_parent->d_inode != udir) in ovl_clear_empty()
399 err = ovl_copy_xattr(dentry->d_sb, upper, opaquedir); in ovl_clear_empty()
413 err = ovl_do_rename(wdir, opaquedir, udir, upper, RENAME_EXCHANGE); in ovl_clear_empty()
417 ovl_cleanup_whiteouts(upper, list); in ovl_clear_empty()
418 ovl_cleanup(wdir, upper); in ovl_clear_empty()
467 struct dentry *upper; in ovl_create_over_whiteout() local
487 upper = lookup_one_len(dentry->d_name.name, upperdir, in ovl_create_over_whiteout()
489 err = PTR_ERR(upper); in ovl_create_over_whiteout()
490 if (IS_ERR(upper)) in ovl_create_over_whiteout()
494 if (d_is_negative(upper) || !IS_WHITEOUT(d_inode(upper))) in ovl_create_over_whiteout()
535 err = ovl_do_rename(wdir, newdentry, udir, upper, in ovl_create_over_whiteout()
540 ovl_cleanup(wdir, upper); in ovl_create_over_whiteout()
542 err = ovl_do_rename(wdir, newdentry, udir, upper, 0); in ovl_create_over_whiteout()
552 dput(upper); in ovl_create_over_whiteout()
741 static bool ovl_matches_upper(struct dentry *dentry, struct dentry *upper) in ovl_matches_upper() argument
743 return d_inode(ovl_dentry_upper(dentry)) == d_inode(upper); in ovl_matches_upper()
752 struct dentry *upper; in ovl_remove_and_whiteout() local
770 upper = lookup_one_len(dentry->d_name.name, upperdir, in ovl_remove_and_whiteout()
772 err = PTR_ERR(upper); in ovl_remove_and_whiteout()
773 if (IS_ERR(upper)) in ovl_remove_and_whiteout()
777 if ((opaquedir && upper != opaquedir) || in ovl_remove_and_whiteout()
779 !ovl_matches_upper(dentry, upper))) { in ovl_remove_and_whiteout()
783 err = ovl_cleanup_and_whiteout(ofs, d_inode(upperdir), upper); in ovl_remove_and_whiteout()
791 dput(upper); in ovl_remove_and_whiteout()
805 struct dentry *upper; in ovl_remove_upper() local
817 upper = lookup_one_len(dentry->d_name.name, upperdir, in ovl_remove_upper()
819 err = PTR_ERR(upper); in ovl_remove_upper()
820 if (IS_ERR(upper)) in ovl_remove_upper()
824 if ((opaquedir && upper != opaquedir) || in ovl_remove_upper()
825 (!opaquedir && !ovl_matches_upper(dentry, upper))) in ovl_remove_upper()
829 err = vfs_rmdir(&init_user_ns, dir, upper); in ovl_remove_upper()
831 err = vfs_unlink(&init_user_ns, dir, upper, NULL); in ovl_remove_upper()
843 dput(upper); in ovl_remove_upper()