btrfs: Fix busyloops in transaction waiting code
commit6dd70ce4eb7429c2ba6dd9fa46f78a0a2a254038
authorJan Kara <jack@suse.cz>
Thu, 26 Jan 2012 20:01:11 +0000 (26 15:01 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 26 Jan 2012 20:01:11 +0000 (26 15:01 -0500)
treed527b7a18a05183b9826d42f42e74811d5793cef
parent357b9784b79924a31ccded5d9a0c688f48cc28f2
btrfs: Fix busyloops in transaction waiting code

wait_log_commit() and wait_for_writer() were using slightly different
conditions for deciding whether they should call schedule() and whether they
should continue in the wait loop. Thus it could happen that we busylooped when
the first condition was not true while the second one was. That is burning CPU
cycles needlessly and is deadly on UP machines...

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/tree-log.c