@@ -544,7 +544,7 @@ static ssize_t queue_wc_store(struct request_queue *q, const char *page,
static ssize_t queue_fua_show(struct request_queue *q, char *page)
{
- return sprintf(page, "%u\n", test_bit(QUEUE_FLAG_FUA, &q->queue_flags));
+ return sprintf(page, "%u\n", blk_queue_fua(q));
}
static ssize_t queue_dax_show(struct request_queue *q, char *page)
@@ -738,7 +738,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
*/
opf = REQ_OP_WRITE;
miter_dir = SG_MITER_TO_SG;
- if (test_bit(QUEUE_FLAG_FUA, &q->queue_flags)) {
+ if (blk_queue_fua(q)) {
if (cmd->se_cmd_flags & SCF_FUA)
opf |= REQ_FUA;
else if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags))
We alreday has the interface blk_queue_fua() to check QUEUE_FLAG_FUA flag, so use it. Signed-off-by: Yi Li <yili@winhong.com> --- block/blk-sysfs.c | 2 +- drivers/target/target_core_iblock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)