Skip to content
Commit 7f7f25e8 authored by Al Viro's avatar Al Viro
Browse files

replace checking for ->read/->aio_read presence with check in ->f_mode



Since we are about to introduce new methods (read_iter/write_iter), the
tests in a bunch of places would have to grow inconveniently.  Check
once (at open() time) and store results in ->f_mode as FMODE_CAN_READ
and FMODE_CAN_WRITE resp.  It might end up being a temporary measure -
once everything switches from ->aio_{read,write} to ->{read,write}_iter
it might make sense to return to open-coded checks.  We'll see...

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b3188919
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment