diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-05-22 15:39:27 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-06-10 22:05:15 +0200 |
commit | 91b94c5d6ae55d1161633047ffeea644b110b35f (patch) | |
tree | 98d75fe560768efc8a0d4d15df528bd9673d31dc /block/fops.c | |
parent | struct file: use anonymous union member for rcuhead and llist (diff) | |
download | linux-91b94c5d6ae55d1161633047ffeea644b110b35f.tar.xz linux-91b94c5d6ae55d1161633047ffeea644b110b35f.zip |
iocb: delay evaluation of IS_SYNC(...) until we want to check IOCB_DSYNC
New helper to be used instead of direct checks for IOCB_DSYNC:
iocb_is_dsync(iocb). Checks converted, which allows to avoid
the IS_SYNC(iocb->ki_filp->f_mapping->host) part (4 cache lines)
from iocb_flags() - it's checked in iocb_is_dsync() instead
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/fops.c')
-rw-r--r-- | block/fops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/fops.c b/block/fops.c index d6b3276a6c68..6e86931ab847 100644 --- a/block/fops.c +++ b/block/fops.c @@ -37,7 +37,7 @@ static unsigned int dio_bio_write_op(struct kiocb *iocb) unsigned int op = REQ_OP_WRITE | REQ_SYNC | REQ_IDLE; /* avoid the need for a I/O completion work item */ - if (iocb->ki_flags & IOCB_DSYNC) + if (iocb_is_dsync(iocb)) op |= REQ_FUA; return op; } |