aio: drop needless assignment in aio_read()
Subsystems (3)
PATCH 1/1 aio: drop needless assignment in aio_read()
Commit 84c4e1f89fef ("aio: simplify - and fix - fget/fput for io_submit()") refactored aio_read() and some error cases into early return, which made some intermediate assignment of the return variable needless.
Drop this needless assignment in aio_read().
No functional change. No change in resulting object code.
---
I cc'ed Linus as he is the author of the referred commit, but I expect that this clean-up just goes the usual way to Al Viro and then in some git pull to Linus.
fs/aio.c | 1 - 1 file changed, 1 deletion(-)
fs/aio.c +0 -1
@@ -1552,7 +1552,6 @@ static int aio_read(struct kiocb *req, const struct iocb *iocb, file = req->ki_filp;if (unlikely (!(file->f_mode &FMODE_READ )))return -EBADF ; - ret = -EINVAL ;if (unlikely (!file->f_op->read_iter))return -EINVAL ;
Signature · 1 line
2.17.1
Quoted 4 lines · Lukas Bulwahn
Drop this needless assignment in
aio_read().No functional change. No change in resulting object code.
Ack, that assignment is indeed dead. As such, compilers will remove it and it doesn't "hurt", but it is pointless and possibly confusing.
Quoted 3 lines
I cc'ed Linus as he is the author of the referred commit, but I expect that this clean-up just goes the usual way to Al Viro and then in some git pull to Linus.
Sounds good to me.
Linus
Quoted 6 lines · Lukas Bulwahn
Commit
84c4e1f89fef("aio: simplify - and fix - fget/fput forio_submit()") refactoredaio_read()and some error cases into early return, which made some intermediate assignment of the return variable needless.Drop this needless assignment in
aio_read().
Quoted 7 lines
No functional change. No change in resulting object code.
Signed-off-by Lukas Bulwahn <[email protected]>---
I cc'ed Linus as he is the author of the referred commit, but I expect that this clean-up just goes the usual way to Al Viro and then in some git pull to Linus.
Applied...