]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix unprotected ->log_batch
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 6 Sep 2012 10:04:27 +0000 (04:04 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:12 +0000 (15:19 -0400)
commit0020a786091580209f06611e89eb8f74f3430415
tree9a2194dde73a1a822fa011c35745c3aafa316f86
parentd689132011daaf4ff0e04c0e38976a56a3f56f9f
Btrfs: fix unprotected ->log_batch

We forget to protect ->log_batch when syncing a file, this patch fix
this problem by atomic operation. And ->log_batch is used to check
if there are parallel sync operations or not, so it is unnecessary to
reset it to 0 after the sync operation of the current log tree complete.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/file.c
fs/btrfs/tree-log.c