diff options
| author | Zizhi Wo <wozizhi@huawei.com> | 2024-11-07 19:06:46 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-09 10:31:45 +0100 |
| commit | ae8c963906edcbbd3fd4ddd1e228790d7304b386 (patch) | |
| tree | a27167b77d3d0d58fbbcaf376e87d5b2c5ccdc5d /block | |
| parent | 01f605a4cd747955c5f796715e770f500736b304 (diff) | |
| download | linux-ae8c963906edcbbd3fd4ddd1e228790d7304b386.tar.gz linux-ae8c963906edcbbd3fd4ddd1e228790d7304b386.tar.bz2 linux-ae8c963906edcbbd3fd4ddd1e228790d7304b386.zip | |
cachefiles: Fix missing pos updates in cachefiles_ondemand_fd_write_iter()
[ Upstream commit 56f4856b425a30e1d8b3e41e6cde8bfba90ba5f8 ]
In the erofs on-demand loading scenario, read and write operations are
usually delivered through "off" and "len" contained in read req in user
mode. Naturally, pwrite is used to specify a specific offset to complete
write operations.
However, if the write(not pwrite) syscall is called multiple times in the
read-ahead scenario, we need to manually update ki_pos after each write
operation to update file->f_pos.
This step is currently missing from the cachefiles_ondemand_fd_write_iter
function, added to address this issue.
Fixes: c8383054506c ("cachefiles: notify the user daemon when looking up cookie")
Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Link: https://lore.kernel.org/r/20241107110649.3980193-3-wozizhi@huawei.com
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions
