keep iocb_flags() result cached in struct file
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 May 2022 15:38:11 +0000 (11:38 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 May 2022 21:33:03 +0000 (17:33 -0400)
commit0d2268309abac0fcfd242ec0bc01481278371ab6
tree6a507d3ef42466470d4e0b01bad182a94fabe045
parentbe159b77f79617580040c9e116e365a301fb7ef7
keep iocb_flags() result cached in struct file

* calculate at the time we set FMODE_OPENED (do_dentry_open() for normal
opens, alloc_file() for pipe()/socket()/etc.)
* update when handling F_SETFL
* keep in a new field - file->f_i_flags; since that thing is needed only
before the refcount reaches zero, we can put it into the same anon union
where ->f_rcuhead and ->f_llist live - those are used only after refcount
reaches zero.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/nvme/target/io-cmd-file.c
fs/aio.c
fs/fcntl.c
fs/file_table.c
fs/io_uring.c
fs/open.c
include/linux/fs.h