aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-08-23 21:08:10 +0100
committerChristian Brauner <brauner@kernel.org>2024-08-24 16:09:16 +0200
commita74ee0e878e262c0276966528d72d4e887174410 (patch)
tree2f03eecf12c91c665297e9d61572def226295b70 /tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
parent0aa2e1b2fb7a75aa4b5b4347055ccfea6f091769 (diff)
afs: Fix post-setattr file edit to do truncation correctly
At the end of an kAFS RPC operation, there is an "edit" phase (originally intended for post-directory modification ops to edit the local image) that the setattr VFS op uses to fix up the pagecache if the RPC that requested truncation of a file was successful. afs_setattr_edit_file() calls truncate_setsize() which sets i_size, expands the pagecache if needed and truncates the pagecache. The first two of those, however, are redundant as they've already been done by afs_setattr_success() under the io_lock and the first is also done under the callback lock (cb_lock). Fix afs_setattr_edit_file() to call truncate_pagecache() instead (which is called by truncate_setsize(), thereby skipping the redundant parts. Fixes: 100ccd18bb41 ("netfs: Optimise away reads above the point at which there can be no data") Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20240823200819.532106-3-dhowells@redhat.com cc: Matthew Wilcox (Oracle) <willy@infradead.org> cc: Pankaj Raghav <p.raghav@samsung.com> cc: Jeff Layton <jlayton@kernel.org> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c')
0 files changed, 0 insertions, 0 deletions