fuse: move fuse file initialization to wpa allocation time
authorJoanne Koong <joannelkoong@gmail.com>
Mon, 26 Aug 2024 21:19:07 +0000 (14:19 -0700)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 29 Aug 2024 09:43:12 +0000 (11:43 +0200)
commit4046d3adcca42b7678f11c71e46bd32bafb4dad1
tree712dd13b973c38b173086e528ff9a88e2309b5c0
parent9a8ebcf5e04e6cc9472bfcdd90b2aeef35a2f8f6
fuse: move fuse file initialization to wpa allocation time

Before this change, wpa->ia.ff is initialized with an acquired reference
on the fuse file right before it submits the writeback request. If there
are auxiliary writebacks, then the initialization and reference
acquisition needs to also be set before we submit the auxiliary writeback
request.

To make the logic simpler and to pave the way for a subsequent
refactoring of fuse_writepages_fill() and fuse_writepage_locked(), this
change initializes and acquires wpa->ia.ff when the wpa is allocated.

No functional changes added.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c