diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-10 22:10:36 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 13:20:47 -0800 |
commit | c544bdb1999e04eb10035f1c3262a103859d94b2 (patch) | |
tree | d74db41598a405ca35df45553715cf15758127da /kernel/mutex.c | |
parent | 73165b88ffd29813bf73b331eaf90d3521443236 (diff) | |
download | lwn-c544bdb1999e04eb10035f1c3262a103859d94b2.tar.gz lwn-c544bdb1999e04eb10035f1c3262a103859d94b2.zip |
[PATCH] mark mutex_lock*() as might_sleep()
Mark mutex_lock() and mutex_lock_interruptible() as might_sleep()
functions.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/mutex.c')
-rw-r--r-- | kernel/mutex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/mutex.c b/kernel/mutex.c index d3dcb8b44bac..5c2561844196 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c @@ -81,6 +81,7 @@ __mutex_lock_slowpath(atomic_t *lock_count __IP_DECL__); */ void fastcall __sched mutex_lock(struct mutex *lock) { + might_sleep(); /* * The locking fastpath is the 1->0 transition from * 'unlocked' into 'locked' state. @@ -253,6 +254,7 @@ __mutex_lock_interruptible_slowpath(atomic_t *lock_count __IP_DECL__); */ int fastcall __sched mutex_lock_interruptible(struct mutex *lock) { + might_sleep(); return __mutex_fastpath_lock_retval (&lock->count, __mutex_lock_interruptible_slowpath); } |