]> git.baikalelectronics.ru Git - kernel.git/commit
fs: align IOCB_* flags with RWF_* flags
authorJens Axboe <axboe@kernel.dk>
Mon, 31 Aug 2020 18:08:10 +0000 (12:08 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 02:32:33 +0000 (20:32 -0600)
commit3483e6bc967f9725b1be6aee03f185de1026ec88
treef762d39763e2697df3e24c523234f8826e80db44
parentd086dbec138ad3d14fdde059ef311dafcada2933
fs: align IOCB_* flags with RWF_* flags

We have a set of flags that are shared between the two and inherired
in kiocb_set_rw_flags(), but we check and set these individually.
Reorder the IOCB flags so that the bottom part of the space is synced
with the RWF flag space, and then we can do them all in one mask and
set operation.

The only exception is RWF_SYNC, which needs to mark IOCB_SYNC and
IOCB_DSYNC. Do that one separately.

This shaves 15 bytes of text from kiocb_set_rw_flags() for me.

Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/fs.h