]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFSv4.1/pNFS: fix LAYOUTCOMMIT retry loop on OLD_STATEID
authorLei Yin <yinlei2@lenovo.com>
Fri, 24 Apr 2026 09:26:41 +0000 (09:26 +0000)
committerAnna Schumaker <anna.schumaker@hammerspace.com>
Mon, 8 Jun 2026 19:02:05 +0000 (15:02 -0400)
commitd616d8bec3b11962735c9c9ff53fb4972162b324
tree8a491b8f73207b58a5b921e63670ad5f60b7c344
parentef74e4453856716dbdaba06eaee5251e37e6882e
NFSv4.1/pNFS: fix LAYOUTCOMMIT retry loop on OLD_STATEID

Handle -NFS4ERR_OLD_STATEID in nfs4_layoutcommit_done().

This issue was reproduced on NFSv4.2.

Without refreshing data->args.stateid, LAYOUTCOMMIT can keep retrying
with the same stale stateid after OLD_STATEID, resulting in an
unbounded retry loop.

Refresh the layout stateid with nfs4_layout_refresh_old_stateid()
and restart the RPC only after a successful refresh.

Changes since v1: update refreshed stateid in inode layout header.

Signed-off-by: Lei Yin <yinlei2@lenovo.com>
[Anna: Fix up dprintk() format specifier]
Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
fs/nfs/nfs4proc.c