Lines Matching full:upper
187 * upper file handle could become stale when upper file is in ovl_decode_real_fh()
563 is_upper ? "upper" : "origin", real, in ovl_verify_origin_xattr()
569 /* Get upper dentry from index */
574 struct dentry *upper; in ovl_index_upper() local
583 upper = ovl_decode_real_fh(ofs, fh, ovl_upper_mnt(ofs), connected); in ovl_index_upper()
586 if (IS_ERR_OR_NULL(upper)) in ovl_index_upper()
587 return upper ?: ERR_PTR(-ESTALE); in ovl_index_upper()
589 if (!d_is_dir(upper)) { in ovl_index_upper()
590 pr_warn_ratelimited("invalid index upper (%pd2, upper=%pd2).\n", in ovl_index_upper()
591 index, upper); in ovl_index_upper()
592 dput(upper); in ovl_index_upper()
596 return upper; in ovl_index_upper()
610 struct dentry *upper = NULL; in ovl_verify_index() local
650 * Directory index entries should have 'upper' xattr pointing to the in ovl_verify_index()
651 * real upper dir. Non-dir index entries are hardlinks to the upper in ovl_verify_index()
654 * decode the upper directory. in ovl_verify_index()
656 upper = ovl_index_upper(ofs, index, false); in ovl_verify_index()
657 if (IS_ERR_OR_NULL(upper)) { in ovl_verify_index()
658 err = PTR_ERR(upper); in ovl_verify_index()
660 * Directory index entries with no 'upper' xattr need to be in ovl_verify_index()
661 * removed. When dir index entry has a stale 'upper' xattr, in ovl_verify_index()
662 * we assume that upper dir was removed and we treat the dir in ovl_verify_index()
672 err = ovl_verify_fh(ofs, upper, OVL_XATTR_ORIGIN, fh); in ovl_verify_index()
673 dput(upper); in ovl_verify_index()
730 * to an inode different than the upper inode, then either the upper inode
781 struct dentry *ovl_lookup_index(struct ovl_fs *ofs, struct dentry *upper, in ovl_lookup_index() argument
834 if (!upper) { in ovl_lookup_index()
840 /* Verify that dir index 'upper' xattr points to upper dir */ in ovl_lookup_index()
841 err = ovl_verify_upper(ofs, index, upper, false); in ovl_lookup_index()
844 …pr_warn_ratelimited("suspected multiply redirected dir found (upper=%pd2, origin=%pd2, index=%pd2)… in ovl_lookup_index()
845 upper, origin, index); in ovl_lookup_index()
849 } else if (upper && d_inode(upper) != inode) { in ovl_lookup_index()
896 struct dentry *lower, struct dentry *upper) in ovl_fix_origin() argument
901 if (ovl_check_origin_xattr(ofs, upper)) in ovl_fix_origin()
912 err = ovl_set_origin_fh(ofs, fh, upper); in ovl_fix_origin()
914 err = ovl_set_impure(dentry->d_parent, upper->d_parent); in ovl_fix_origin()
1139 * If no origin fh is stored in upper of a merge dir, store fh in ovl_lookup()
1140 * of lower dir and set upper parent "impure". in ovl_lookup()
1193 * This is only a problem if the upper layer is untrusted (e.g in ovl_lookup()
1224 * For regular non-metacopy upper dentries, there is no lower in ovl_lookup()
1226 * using ORIGIN xattr on upper, install it in stack. in ovl_lookup()
1254 * upper inode. We only trust dir index if we verified that lower dir in ovl_lookup()
1258 * For regular upper, we already set origin if upper had ORIGIN in ovl_lookup()
1262 * For metacopy upper, we set a verified origin already if index in ovl_lookup()
1263 * is enabled and if upper had an ORIGIN xattr. in ovl_lookup()
1389 /* Negative upper -> positive lower */ in ovl_lower_positive()
1394 /* Positive upper -> have to look up lower to see whether it exists */ in ovl_lower_positive()