Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 202bfe2b authored by Alessio Balsini's avatar Alessio Balsini Committed by Treehugger Robot
Browse files

BACKPORT: 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.

In Android this is required by the FUSE passthrough patches as
8bcc2d697908 ("FROMLIST: fs: Generic function to convert iocb to rw
flags") relies on the alignment of RWF and IOCB flags.

Bug: 254441685
(cherry picked from commit ce71bfea207b4d7c21d36f24ec37618ffcea1da8)
Suggested-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Change-Id: Ib6316ae5cb3f8a14fabef5492e79783c9e6d3c4d
Signed-off-by: default avatarAlessio Balsini <balsini@google.com>
Signed-off-by: default avatarLee Jones <joneslee@google.com>
parent 141f8d76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment