Commit e25c47bc authored by Anton Blanchard's avatar Anton Blanchard

ppc64: add might_sleep to semaphore code

parent 50178ca6
...@@ -77,6 +77,7 @@ static inline void down(struct semaphore * sem) ...@@ -77,6 +77,7 @@ static inline void down(struct semaphore * sem)
#if WAITQUEUE_DEBUG #if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
might_sleep();
/* /*
* Try to get the semaphore, take the slow path if we fail. * Try to get the semaphore, take the slow path if we fail.
...@@ -93,6 +94,7 @@ static inline int down_interruptible(struct semaphore * sem) ...@@ -93,6 +94,7 @@ static inline int down_interruptible(struct semaphore * sem)
#if WAITQUEUE_DEBUG #if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
might_sleep();
if (atomic_dec_return(&sem->count) < 0) if (atomic_dec_return(&sem->count) < 0)
ret = __down_interruptible(sem); ret = __down_interruptible(sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment