History

Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fixes from Ingo Molnar: "A paravirt UP-patching fix, and an I2C MUX driver lockdep warning fix" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/pvqspinlock/x86: Use LOCK_PREFIX in __pv_queued_spin_unlock() assembly code i2c/mux, locking/core: Annotate the nested rt_mutex usage locking/rtmutex: Allow specifying a subclass for nested locking

Linus Torvalds committed 8 years ago

Commit fb20c032 parents d464b03 c0dc3735 files · +36 −8Browse files

Showing the changes to kernel (1 of 5 files). Show all

Unified · Split

kernel/locking/rtmutex.c+25−4
@@ -1465,6 +1465,29 @@ rt_mutex_fastunlock(struct rt_mutex *lock, · 1464 unmodified lines
1465 rt_mutex_postunlock(&wake_q);1465 rt_mutex_postunlock(&wake_q);
1466}1466}
1467 1467
1468static inline void __rt_mutex_lock(struct rt_mutex *lock, unsigned int subclass)
1469{
1470 might_sleep();
1471
1472 mutex_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
1473 rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, rt_mutex_slowlock);
1474}
1475
1476#ifdef CONFIG_DEBUG_LOCK_ALLOC
1477/**
1478 * rt_mutex_lock_nested - lock a rt_mutex
1479 *
1480 * @lock: the rt_mutex to be locked
1481 * @subclass: the lockdep subclass
1482 */
1483void __sched rt_mutex_lock_nested(struct rt_mutex *lock, unsigned int subclass)
1484{
1485 __rt_mutex_lock(lock, subclass);
1486}
1487EXPORT_SYMBOL_GPL(rt_mutex_lock_nested);
1488#endif
1489
1490#ifndef CONFIG_DEBUG_LOCK_ALLOC
1468/**1491/**
1469 * rt_mutex_lock - lock a rt_mutex1492 * rt_mutex_lock - lock a rt_mutex
1470 *1493 *
@@ -1472,12 +1495,10 @@ rt_mutex_fastunlock(struct rt_mutex *lock, · 1 unmodified line
1472 */1495 */
1473void __sched rt_mutex_lock(struct rt_mutex *lock)1496void __sched rt_mutex_lock(struct rt_mutex *lock)
1474{1497{
1475 might_sleep();1498 __rt_mutex_lock(lock, 0);
1476
1477 mutex_acquire(&lock->dep_map, 0, 0, _RET_IP_);
1478 rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, rt_mutex_slowlock);
1479}1499}
1480EXPORT_SYMBOL_GPL(rt_mutex_lock);1500EXPORT_SYMBOL_GPL(rt_mutex_lock);
1501#endif
1481 1502
1482/**1503/**
1483 * rt_mutex_lock_interruptible - lock a rt_mutex interruptible1504 * rt_mutex_lock_interruptible - lock a rt_mutex interruptible

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t