bcachefs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method
authorYouling Tang <tangyouling@kylinos.cn>
Fri, 10 May 2024 06:10:58 +0000 (14:10 +0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 20 May 2024 09:37:26 +0000 (05:37 -0400)
commit54429c902af909448371f40af59d4437a57949c7
tree2a2f6a2c99aefe75c0ec3e8ced4d368e1e148ab3
parent427ba555036e85ed0805f45ca3896b68602e0a80
bcachefs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method

Since commit a2ad63daa88b ("VFS: add FMODE_CAN_ODIRECT file flag") file
systems can just set the FMODE_CAN_ODIRECT flag at open time instead of
wiring up a dummy direct_IO method to indicate support for direct I/O.
Do that for bcachefs so that noop_direct_IO can eventually be removed.

Similar to commit b29434999371 ("xfs: set FMODE_CAN_ODIRECT instead of
a dummy direct_IO method").

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c