]> git.baikalelectronics.ru Git - kernel.git/commit
ext3: Fix fsync error handling after filesystem abort.
authorDmitry Monakhov <dmonakhov@openvz.org>
Tue, 28 May 2013 09:19:01 +0000 (13:19 +0400)
committerJan Kara <jack@suse.cz>
Thu, 4 Jul 2013 17:22:55 +0000 (19:22 +0200)
commit0c9d1d71c3a77bec1d0d7f822491aaf93c68873c
tree4d94cec2052684e7b2a27ca4769654aceca2ca9e
parent677a58589201a980a53ff2acf3ab80ddb62d3964
ext3: Fix fsync error handling after filesystem abort.

If filesystem was aborted we will return success
due to (sb->s_flags & MS_RDONLY) which is incorrect and
results in data loss.
In order to handle fs abort correctly we have to check
fs state once we discover that it is in MS_RDONLY state

Test case: http://patchwork.ozlabs.org/patch/244297/
Changes from V1:
 - fix spelling
 - fix smp_rmb()/debug order

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/fsync.c
fs/ext3/super.c