Lines Matching defs:object

37 #include "object.h"
41 /* Underlying object management */
43 static void release_inode(struct landlock_object *const object)
44 __releases(object->lock)
46 struct inode *const inode = object->underobj;
50 spin_unlock(&object->lock);
58 object->underobj = NULL;
65 spin_unlock(&object->lock);
67 * Because object->underobj was not NULL, hook_sb_delete() and
69 * landlock_inode(inode)->object while it is not NULL. It is therefore
72 rcu_assign_pointer(landlock_inode(inode)->object, NULL);
90 struct landlock_object *object, *new_object;
95 object = rcu_dereference(inode_sec->object);
96 if (object) {
97 if (likely(refcount_inc_not_zero(&object->usage))) {
99 return object;
102 * We are racing with release_inode(), the object is going
105 spin_lock(&object->lock);
106 spin_unlock(&object->lock);
112 * If there is no object tied to @inode, then create a new one (without
124 if (unlikely(rcu_access_pointer(inode_sec->object))) {
125 /* Someone else just created the object, bail out and retry. */
136 * related object.
139 rcu_assign_pointer(inode_sec->object, new_object);
171 struct landlock_object *object;
184 object = get_inode_object(d_backing_inode(path->dentry));
185 if (IS_ERR(object))
186 return PTR_ERR(object);
188 err = landlock_insert_rule(ruleset, object, access_rights);
192 * increments the refcount for the new object if needed.
194 landlock_put_object(object);
219 domain, rcu_dereference(landlock_inode(inode)->object));
914 * All inodes must already have been untied from their object by
917 WARN_ON_ONCE(landlock_inode(inode)->object);
936 struct landlock_object *object;
951 * second call to iput() for the same Landlock object. Also
952 * checks I_NEW because such inode cannot be tied to an object.
960 object = rcu_dereference(landlock_inode(inode)->object);
961 if (!object) {
975 spin_lock(&object->lock);
976 if (object->underobj == inode) {
977 object->underobj = NULL;
978 spin_unlock(&object->lock);
982 * Because object->underobj was not NULL,
985 * landlock_inode(inode)->object while it is not NULL.
988 rcu_assign_pointer(landlock_inode(inode)->object, NULL);
999 spin_unlock(&object->lock);