NFSv4: Fix clearing of layout segments in layoutreturn
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 21 Aug 2024 18:05:01 +0000 (14:05 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 22 Aug 2024 21:01:10 +0000 (17:01 -0400)
commitd72b7963115bea971a28eaa2cb76722c023f9fdf
tree091ced24c59b61967f6fc17faa07e0ae99c8c882
parenta017ad1313fc91bdf235097fd0a02f673fc7bb11
NFSv4: Fix clearing of layout segments in layoutreturn

Make sure that we clear the layout segments in cases where we see a
fatal error, and also in the case where the layout is invalid.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c