Lines Matching refs:upper
234 static int ovl_set_opaque_xerr(struct dentry *dentry, struct dentry *upper, in ovl_set_opaque_xerr() argument
240 err = ovl_check_setxattr(ofs, upper, OVL_XATTR_OPAQUE, "y", 1, xerr); in ovl_set_opaque_xerr()
370 struct dentry *upper; in ovl_clear_empty() local
391 upper = upperpath.dentry; in ovl_clear_empty()
392 if (upper->d_parent->d_inode != udir) in ovl_clear_empty()
414 err = ovl_do_rename(ofs, wdir, opaquedir, udir, upper, RENAME_EXCHANGE); in ovl_clear_empty()
418 ovl_cleanup_whiteouts(ofs, upper, list); in ovl_clear_empty()
419 ovl_cleanup(ofs, wdir, upper); in ovl_clear_empty()
453 struct dentry *upper; in ovl_create_over_whiteout() local
473 upper = ovl_lookup_upper(ofs, dentry->d_name.name, upperdir, in ovl_create_over_whiteout()
475 err = PTR_ERR(upper); in ovl_create_over_whiteout()
476 if (IS_ERR(upper)) in ovl_create_over_whiteout()
480 if (d_is_negative(upper) || !IS_WHITEOUT(d_inode(upper))) in ovl_create_over_whiteout()
521 err = ovl_do_rename(ofs, wdir, newdentry, udir, upper, in ovl_create_over_whiteout()
526 ovl_cleanup(ofs, wdir, upper); in ovl_create_over_whiteout()
528 err = ovl_do_rename(ofs, wdir, newdentry, udir, upper, 0); in ovl_create_over_whiteout()
538 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 = ovl_lookup_upper(ofs, 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()
806 struct dentry *upper; in ovl_remove_upper() local
818 upper = ovl_lookup_upper(ofs, dentry->d_name.name, upperdir, in ovl_remove_upper()
820 err = PTR_ERR(upper); in ovl_remove_upper()
821 if (IS_ERR(upper)) in ovl_remove_upper()
825 if ((opaquedir && upper != opaquedir) || in ovl_remove_upper()
826 (!opaquedir && !ovl_matches_upper(dentry, upper))) in ovl_remove_upper()
830 err = ovl_do_rmdir(ofs, dir, upper); in ovl_remove_upper()
832 err = ovl_do_unlink(ofs, dir, upper); in ovl_remove_upper()
844 dput(upper); in ovl_remove_upper()