Btrfs: Fix the problem that the dirty flag of dev stats is cleared
commitaddc3fa74e5bcfabc0766f934a8895d1f9f6a67c
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 24 Jul 2014 03:37:11 +0000 (24 11:37 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:37:46 +0000 (17 13:37 -0700)
treeeae6105559c9163b1800b5a5b7340a134d389bb5
parentd5ee37bcb1dff9c1d1cac5f7e5752309f1ff66b6
Btrfs: Fix the problem that the dirty flag of dev stats is cleared

The io error might happen during writing out the device stats, and the
device stats information and dirty flag would be update at that time,
but the current code didn't consider this case, just clear the dirty
flag, it would cause that we forgot to write out the new device stats
information. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h