Fix O_APPEND for Linux 3.15 and older kernels
commit63b18e4097cd5268cb197327ee8494ffa3dca151
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 27 Apr 2022 19:56:17 +0000 (27 12:56 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Apr 2022 19:56:17 +0000 (27 12:56 -0700)
tree59c5c71513d8a93e634078db9b9212a6126db38b
parent7dde17e8609313d41c8956b3fec6db3a695bf852
Fix O_APPEND for Linux 3.15 and older kernels

When using a Linux kernel which predates the iov_iter interface the
O_APPEND flag should be applied in zpl_aio_write() via the call to
generic_write_checks().  The updated pos variable  was incorrectly
ignored resulting in the current offset being used.

This issue should only realistically impact the RHEL/CentOS 7.x
kernels which are based on Linux 3.10.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13370
Closes #13377
module/os/linux/zfs/zpl_file.c