Skip to content
  • Namhyung Kim's avatar
    md/raid5: fix FUA request handling in ops_run_io() · b062962e
    Namhyung Kim authored
    Commit e9c7469b
    
     ("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>
    Cc: stable@kernel.org
    Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    b062962e