netfs: Reduce number of conditional branches in netfs_perform_write()
authorDavid Howells <dhowells@redhat.com>
Wed, 5 Jun 2024 10:33:01 +0000 (11:33 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 5 Sep 2024 09:00:41 +0000 (11:00 +0200)
commit8f52de0077ba3bf41e5d53d67a185700f41efce7
treefdf1fe7fa010052afd72ba27fc97908578c4b4b0
parentef966d73fb7cab5736407998a4ae42577bb34a3b
netfs: Reduce number of conditional branches in netfs_perform_write()

Reduce the number of conditional branches in netfs_perform_write() by
merging in netfs_how_to_modify() and then creating a separate if-statement
for each way we might modify a folio.  Note that this means replicating the
data copy in each path.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20240814203850.2240469-6-dhowells@redhat.com/
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/netfs/buffered_write.c
include/trace/events/netfs.h