Lines Matching refs:cnode

58 static int cp_restore_keys(struct cprotect *, struct hfsmount *hfsmp, struct cnode *);
63 static int cp_new(int newclass, struct hfsmount *hfsmp, struct cnode *cp, mode_t cmode, struct cprotect **output_entry);
64 static int cp_rewrap(struct cnode *cp, struct hfsmount *hfsmp, int newclass);
65 static int cp_unwrap(struct hfsmount *, struct cprotect *, struct cnode *);
67 static void cp_init_access(cp_cred_t access, struct cnode *cp);
121 * Allocate and initialize a cprotect blob for a new cnode.
122 * Called from hfs_getnewvnode: cnode is locked exclusive.
124 * Read xattr data off the cnode. Then, if conditions permit,
128 cp_entry_init(struct cnode *cp, struct mount *mp)
135 * The cnode should be locked at this point, regardless of whether or not
139 * after the regular data fork cnode has already been constructed.
236 int cp_setup_newentry (struct hfsmount *hfsmp, struct cnode *dcp, int32_t suppliedclass,
349 * a cnode directly, we take a pointer to the cprotect struct.
391 * Called at hfs_reclaim_cnode: cnode is locked exclusive.
412 * Return a pointer to underlying cnode if there is one for this vnode.
413 * Done without taking cnode lock, inspecting only vnode state.
415 struct cnode *
427 return (struct cnode*) vp->v_data;
440 struct cnode *cp;
465 * We take only the shared cnode lock up-front. If it turns out that
467 * shared cnode lock and acquire an exclusive lock.
479 panic("Content Protection: uninitialized cnode %p", cp);
506 struct cnode *cp;
538 * Take the cnode truncate lock exclusive because we want to manipulate the
648 struct cnode *cp;
672 * Take the cnode truncate lock exclusive because we want to manipulate the
744 * Takes cnode lock, and upgrades to exclusive if modifying cprotect.
746 * Note that this function does *NOT* take the cnode truncate lock. This is because
750 * Either way, the cnode lock still ultimately guards the keys. We only rely on the
759 struct cnode *cp = NULL;
795 * If this cnode is not content protected, simply return success.
892 struct cnode *cp = NULL ;
907 /* We know the vnode is in a valid state. acquire cnode and validate */
931 * Does the cnode have keys yet? If not, then generate them.
954 * we infer that this was a newly created vnode/cnode. Even though a potential
1028 * normal VNOPS that read/write data to files. Specifically, we already have the cnode
1035 cp_handle_relocate (struct cnode *cp, struct hfsmount *hfsmp)
1158 * Stores new xattr data on the cnode.
1159 * cnode lock held exclusive (if available).
1163 int cp_setxattr(struct cnode *cp, struct cprotect *entry, struct hfsmount *hfsmp, uint32_t fileid, int options)
1169 struct cnode *arg_cp = NULL;
1186 * we do not have a vnode/cnode yet. Use the specified fileid.
1397 * Initializes a new cprotect entry with xattr data from the cnode.
1398 * cnode lock held shared
1401 cp_getxattr(struct cnode *cp, struct hfsmount *hfsmp, struct cprotect **outentry)
1584 * cnode lock held exclusive
1587 cp_restore_keys(struct cprotect *entry, struct hfsmount *hfsmp, struct cnode *cp)
1640 cp_check_access(struct cnode *cp, int vnop __unused)
1695 * take the truncate lock AND the cnode lock. By taking
1725 * hfs_vnop_strategy does not take the cnode lock
1793 cp_rewrap(struct cnode *cp, struct hfsmount *hfsmp, int newclass)
1860 /* Attach the new entry to the cnode */
1875 cp_unwrap(struct hfsmount *hfsmp, struct cprotect *entry, struct cnode *cp)
1943 * Take a cnode that has already been initialized and establish persistent and
1945 * directory entry has already been created and we are holding the cnode lock
1949 int cp_generate_keys (struct hfsmount *hfsmp, struct cnode *cp, int targetclass, struct cprotect **newentry)
2017 void cp_replace_entry (struct cnode *cp, struct cprotect *newentry)
2042 cp_new(int newclass, struct hfsmount *hfsmp, struct cnode *cp, mode_t cmode, struct cprotect **output_entry)
2183 static void cp_init_access(cp_cred_t access, struct cnode *cp)