commit ffceb7640cbfe6ea60e7769e107451d63a2fe3d3 upstream smb: client: do not defer close open handles to deleted files requesting backport to 6.8.x, 6.6.x, 6.5.x and 6.1.x
This patch fixes an issue with deferred closes on the smb client exposed by patch 1 of this patch series: https://lore.kernel.org/stable/CAFTVevWEnEDAQbw59N-R03ppFgqa3qwTySfn61-+T4Vo... commit 2c7d399e551ccfd87bcae4ef5573097f3313d779 (smb: client: reuse file lease key in compound operations)
Without this patch applied, when an application deletes a file before closing all open handles to the said file, the smb client can defer close its handles. Consequentially, creating another file with the same name fails until all deferred handles close (specified by closetimeo value). When the rename, delete and set_path_size compound operations did not reuse leases, the lease breaks took care of degrading the file handle leases everytime one of these operations happened (even when on the same client). Without these (redundant) lease breaks on the same client, the handles still remain valid and this fix becomes necessary. Eg: Patch 1 without this patch would regress xfstest generic 591.
Thanks Meetakshi
linux-stable-mirror@lists.linaro.org