aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-07-23 08:57:21 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2021-08-09 16:57:04 -0400
commitd6236a98b3bab07c0a1455fd1ab46f79c3978cdc (patch)
treee19eb9c29fdd30a0abeef39dfb26a62e32f5e240 /fs/nfs/pnfs.c
parentNFSv4/pNFS: Always allow update of a zero valued layout barrier (diff)
downloadlinux-dev-d6236a98b3bab07c0a1455fd1ab46f79c3978cdc.tar.xz
linux-dev-d6236a98b3bab07c0a1455fd1ab46f79c3978cdc.zip
NFSv4/pnfs: The layout barrier indicate a minimal value for the seqid
The intention of the layout barrier is to ensure that we do not update the layout to match an older value than the current expectation. Fix the test in pnfs_layout_stateid_blocked() to reflect that it is legal for the seqid of the stateid to match that of the barrier. Fixes: aa95edf309ef ("NFSv4/pnfs: Fix the layout barrier update") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 7775f6b5a53a..7c9090a28e5c 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1000,7 +1000,7 @@ pnfs_layout_stateid_blocked(const struct pnfs_layout_hdr *lo,
{
u32 seqid = be32_to_cpu(stateid->seqid);
- return !pnfs_seqid_is_newer(seqid, lo->plh_barrier) && lo->plh_barrier;
+ return lo->plh_barrier && pnfs_seqid_is_newer(lo->plh_barrier, seqid);
}
/* lget is set to 1 if called from inside send_layoutget call chain */