]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: fix FUA request handling in ops_run_io()
authorNamhyung Kim <namhyung@gmail.com>
Tue, 14 Jun 2011 04:20:19 +0000 (14:20 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:41 +0000 (15:05 -0700)
commit2cd3e43e8db9d0ae1af443418547f65ee1efa280
treea0750dc6f4c79938cca9a9779c9271c8929786ce
parentfbfa65f9e3eb26937a90f023a8fd4d181189c1ef
md/raid5: fix FUA request handling in ops_run_io()

commit b062962edb086011e94ec4d9eb3f6a6d814f2a8f upstream.

Commit e9c7469bb4f5 ("md: implment REQ_FLUSH/FUA support")
introduced R5_WantFUA flag and set rw to WRITE_FUA in that case.
However remaining code still checks whether rw is exactly same
as WRITE or not, so FUAed-write ends up with being treated as
READ. Fix it.

This bug has been present since 2.6.37 and the fix is suitable for any
-stable kernel since then.  It is not clear why this has not caused
more problems.

Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/raid5.c