mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 19:39:35 +03:00
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
This commit is contained in:
parent
7dde17e860
commit
63b18e4097
@ -417,6 +417,8 @@ zpl_aio_write(struct kiocb *kiocb, const struct iovec *iov,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
||||||
|
kiocb->ki_pos = pos;
|
||||||
|
|
||||||
zfs_uio_t uio;
|
zfs_uio_t uio;
|
||||||
zfs_uio_iovec_init(&uio, iov, nr_segs, kiocb->ki_pos, UIO_USERSPACE,
|
zfs_uio_iovec_init(&uio, iov, nr_segs, kiocb->ki_pos, UIO_USERSPACE,
|
||||||
count, 0);
|
count, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user