mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
sched/wait, fs/fscache: Convert wait_on_atomic_t() usage to the new wait_var_event() API
The old wait_on_atomic_t() is going to get removed, use the more flexible wait_var_event() API instead. No change in functionality. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: David Howells <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
4625956a4e
commit
dc5d4afbb0
2 changed files with 5 additions and 4 deletions
|
|
@ -557,9 +557,10 @@ void __fscache_disable_cookie(struct fscache_cookie *cookie, bool invalidate)
|
|||
* n_active reaches 0). This makes sure outstanding reads and writes
|
||||
* have completed.
|
||||
*/
|
||||
if (!atomic_dec_and_test(&cookie->n_active))
|
||||
wait_on_atomic_t(&cookie->n_active, atomic_t_wait,
|
||||
TASK_UNINTERRUPTIBLE);
|
||||
if (!atomic_dec_and_test(&cookie->n_active)) {
|
||||
wait_var_event(&cookie->n_active,
|
||||
!atomic_read(&cookie->n_active));
|
||||
}
|
||||
|
||||
/* Make sure any pending writes are cancelled. */
|
||||
if (cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX)
|
||||
|
|
|
|||
Loading…
Reference in a new issue