]> git.baikalelectronics.ru Git - kernel.git/commit
Fix __wait_on_atomic_t() to call the action func if the counter != 0
authorDavid Howells <dhowells@redhat.com>
Tue, 23 Jul 2013 15:49:24 +0000 (16:49 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 Jul 2013 22:46:48 +0000 (15:46 -0700)
commit9b048ff35c61eb2712d1b67c70e83b9a9857b825
tree81a5bba5e15a6f680541aca0f04b204e8a2f4145
parent072421cba50e84ec6840fb01f7adbae2e020e7c8
Fix __wait_on_atomic_t() to call the action func if the counter != 0

Fix __wait_on_atomic_t() so that it calls the action func if the counter != 0
rather than if the counter is 0 so as to be analogous to __wait_on_bit().

Thanks to Yacine who found this by visual inspection.

This will affect FS-Cache in that it will could fail to sleep correctly when
trying to clean up after a netfs cookie is withdrawn.

Reported-by: Yacine Belkadi <yacine.belkadi.1@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
cc: Milosz Tanski <milosz@adfin.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/wait.c