diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-05-22 16:39:27 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-06-10 23:05:15 +0300 |
commit | 91b94c5d6ae55d1161633047ffeea644b110b35f (patch) | |
tree | 98d75fe560768efc8a0d4d15df528bd9673d31dc /fs/btrfs/file.c | |
parent | e87f2c26c8085dac59978dee1beeb05cef31a9dd (diff) | |
download | linux-91b94c5d6ae55d1161633047ffeea644b110b35f.tar.xz |
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 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 98f81e304eb1..54358a5c9d56 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2021,7 +2021,7 @@ ssize_t btrfs_do_write_iter(struct kiocb *iocb, struct iov_iter *from, struct file *file = iocb->ki_filp; struct btrfs_inode *inode = BTRFS_I(file_inode(file)); ssize_t num_written, num_sync; - const bool sync = iocb->ki_flags & IOCB_DSYNC; + const bool sync = iocb_is_dsync(iocb); /* * If the fs flips readonly due to some impossible error, although we |