Home
last modified time | relevance | path

Searched refs:lockref (Results 1 – 11 of 11) sorted by relevance

/openbmc/linux/lib/
H A Dlockref.c13 struct lockref old; \
15 old.lock_count = READ_ONCE(lockref->lock_count); \
17 struct lockref new = old; \
19 if (likely(try_cmpxchg64_relaxed(&lockref->lock_count, \
42 void lockref_get(struct lockref *lockref) in lockref_get() argument
50 spin_lock(&lockref->lock); in lockref_get()
51 lockref->count++; in lockref_get()
52 spin_unlock(&lockref->lock); in lockref_get()
61 int lockref_get_not_zero(struct lockref *lockref) in lockref_get_not_zero() argument
73 spin_lock(&lockref->lock); in lockref_get_not_zero()
[all …]
H A DMakefile43 obj-y += lockref.o
/openbmc/linux/include/linux/
H A Dlockref.h25 struct lockref { struct
37 extern void lockref_get(struct lockref *); argument
38 extern int lockref_put_return(struct lockref *);
39 extern int lockref_get_not_zero(struct lockref *);
40 extern int lockref_put_not_zero(struct lockref *);
41 extern int lockref_put_or_lock(struct lockref *);
43 extern void lockref_mark_dead(struct lockref *);
44 extern int lockref_get_not_dead(struct lockref *);
47 static inline bool __lockref_is_dead(const struct lockref *l) in __lockref_is_dead()
H A Ddcache.h94 struct lockref d_lockref; /* per-dentry lock and refcount */
/openbmc/linux/fs/erofs/
H A Dutils.c37 if (lockref_get_not_zero(&grp->lockref)) in erofs_workgroup_get()
40 spin_lock(&grp->lockref.lock); in erofs_workgroup_get()
41 if (__lockref_is_dead(&grp->lockref)) { in erofs_workgroup_get()
42 spin_unlock(&grp->lockref.lock); in erofs_workgroup_get()
46 if (!grp->lockref.count++) in erofs_workgroup_get()
48 spin_unlock(&grp->lockref.lock); in erofs_workgroup_get()
80 DBG_BUGON(grp->lockref.count < 1); in erofs_insert_workgroup()
108 if (lockref_put_or_lock(&grp->lockref)) in erofs_workgroup_put()
111 DBG_BUGON(__lockref_is_dead(&grp->lockref)); in erofs_workgroup_put()
112 if (grp->lockref.count == 1) in erofs_workgroup_put()
[all …]
H A Dinternal.h208 struct lockref lockref; member
H A Dzdata.c667 spin_lock(&pcl->obj.lockref.lock); in z_erofs_cache_release_folio()
668 if (pcl->obj.lockref.count > 0) in z_erofs_cache_release_folio()
682 spin_unlock(&pcl->obj.lockref.lock); in z_erofs_cache_release_folio()
798 spin_lock_init(&pcl->obj.lockref.lock); in z_erofs_register_pcluster()
799 pcl->obj.lockref.count = 1; /* one ref for this request */ in z_erofs_register_pcluster()
/openbmc/linux/fs/gfs2/
H A Dincore.h341 struct lockref gl_lockref;
445 struct lockref qd_lockref;
/openbmc/linux/Documentation/filesystems/
H A Dpath-lookup.rst167 This uses the lockref primitive to provide both a spinlock and a
/openbmc/linux/
H A Dopengrok0.0.log[all...]
H A Dopengrok1.0.log[all...]