Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking updates from Ingo Molnar: "The main changes in this cycle were: - Implement wraparound-safe refcount_t and kref_t types based on generic atomic primitives (Peter Zijlstra) - Improve and fix the ww_mutex code (Nicolai Hähnle) - Add self-tests to the ww_mutex code (Chris Wilson) - Optimize percpu-rwsems with the 'rcuwait' mechanism (Davidlohr Bueso) - Micro-optimize the current-task logic all around the core kernel (Davidlohr Bueso) - Tidy up after recent optimizations: remove stale code and APIs, clean up the code (Waiman Long) - ... plus misc fixes, updates and cleanups" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits) fork: Fix task_struct alignment locking/spinlock/debug: Remove spinlock lockup detection code lockdep: Fix incorrect condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS lkdtm: Convert to refcount_t testing kref: Implement 'struct kref' using refcount_t refcount_t: Introduce a special purpose refcount type sched/wake_q: Clarify queue reinit comment sched/wait, rcuwait: Fix typo in comment locking/mutex: Fix lockdep_assert_held() fail locking/rtmutex: Flip unlikely() branch to likely() in __rt_mutex_slowlock() locking/rwsem: Reinit wake_q after use locking/rwsem: Remove unnecessary atomic_long_t casts jump_labels: Move header guard #endif down where it belongs locking/atomic, kref: Implement kref_put_lock() locking/ww_mutex: Turn off __must_check for now locking/atomic, kref: Avoid more abuse locking/atomic, kref: Use kref_get_unless_zero() more locking/atomic, kref: Kill kref_sub() locking/atomic, kref: Add kref_read() locking/atomic, kref: Add KREF_INIT() ...
This commit is contained in:
@@ -3425,7 +3425,7 @@ static void ceph_msg_release(struct kref *kref)
|
||||
struct ceph_msg *ceph_msg_get(struct ceph_msg *msg)
|
||||
{
|
||||
dout("%s %p (was %d)\n", __func__, msg,
|
||||
atomic_read(&msg->kref.refcount));
|
||||
kref_read(&msg->kref));
|
||||
kref_get(&msg->kref);
|
||||
return msg;
|
||||
}
|
||||
@@ -3434,7 +3434,7 @@ EXPORT_SYMBOL(ceph_msg_get);
|
||||
void ceph_msg_put(struct ceph_msg *msg)
|
||||
{
|
||||
dout("%s %p (was %d)\n", __func__, msg,
|
||||
atomic_read(&msg->kref.refcount));
|
||||
kref_read(&msg->kref));
|
||||
kref_put(&msg->kref, ceph_msg_release);
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_msg_put);
|
||||
|
@@ -438,7 +438,7 @@ static void ceph_osdc_release_request(struct kref *kref)
|
||||
void ceph_osdc_get_request(struct ceph_osd_request *req)
|
||||
{
|
||||
dout("%s %p (was %d)\n", __func__, req,
|
||||
atomic_read(&req->r_kref.refcount));
|
||||
kref_read(&req->r_kref));
|
||||
kref_get(&req->r_kref);
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_osdc_get_request);
|
||||
@@ -447,7 +447,7 @@ void ceph_osdc_put_request(struct ceph_osd_request *req)
|
||||
{
|
||||
if (req) {
|
||||
dout("%s %p (was %d)\n", __func__, req,
|
||||
atomic_read(&req->r_kref.refcount));
|
||||
kref_read(&req->r_kref));
|
||||
kref_put(&req->r_kref, ceph_osdc_release_request);
|
||||
}
|
||||
}
|
||||
@@ -487,11 +487,11 @@ static void request_reinit(struct ceph_osd_request *req)
|
||||
struct ceph_msg *reply_msg = req->r_reply;
|
||||
|
||||
dout("%s req %p\n", __func__, req);
|
||||
WARN_ON(atomic_read(&req->r_kref.refcount) != 1);
|
||||
WARN_ON(kref_read(&req->r_kref) != 1);
|
||||
request_release_checks(req);
|
||||
|
||||
WARN_ON(atomic_read(&request_msg->kref.refcount) != 1);
|
||||
WARN_ON(atomic_read(&reply_msg->kref.refcount) != 1);
|
||||
WARN_ON(kref_read(&request_msg->kref) != 1);
|
||||
WARN_ON(kref_read(&reply_msg->kref) != 1);
|
||||
target_destroy(&req->r_t);
|
||||
|
||||
request_init(req);
|
||||
|
Reference in New Issue
Block a user