]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Fix busyloops in transaction waiting code
authorJan Kara <jack@suse.cz>
Thu, 26 Jan 2012 20:01:11 +0000 (15:01 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 26 Jan 2012 20:01:11 +0000 (15:01 -0500)
commitd0f507cc3cbfcb998465a74e454bd7adccb086bc
treed527b7a18a05183b9826d42f42e74811d5793cef
parentdd967e13f0abbae418f2936580e55960b09f5045
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