From: Wang Shilong Date: Tue, 14 Jan 2014 11:42:20 +0000 (+0800) Subject: Btrfs: fix transaction abortion when remounting btrfs from RW to RO X-Git-Tag: v3.14-rc1~29^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c21b4d733d6e50514e30ffd87110364ddda695b;p=pandora-kernel.git Btrfs: fix transaction abortion when remounting btrfs from RW to RO Steps to reproduce: # mkfs.btrfs -f /dev/sda8 # mount /dev/sda8 /mnt -o flushoncommit # dd if=/dev/zero of=/mnt/data bs=4k count=102400 & # mount /dev/sda8 /mnt -o remount, ro When remounting RW to RO, the logic is to firstly set flag to RO and then commit transaction, however with option flushoncommit enabled,we will do RO check within committing transaction, so we get a transaction abortion here. Actually,here check is wrong, we should check if FS_STATE_ERROR is set, fix it. Reported-by: Qu Wenruo Suggested-by: Miao Xie Signed-off-by: Wang Shilong Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed