summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-05-16 17:42:43 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-17 15:48:06 -0400
commit93b717fd81bf6b9a73c3702e9b079b4de8148b34 (patch)
tree0ae5ec7f5a79410e12710941fffc9725a687c6d8 /fs/nfs/nfs4proc.c
parent9a8f6b5ea275ff01fc8ef3b8630a3d4ed6b0a362 (diff)
downloadlinux-stable-93b717fd81bf6b9a73c3702e9b079b4de8148b34.tar.gz
linux-stable-93b717fd81bf6b9a73c3702e9b079b4de8148b34.tar.bz2
linux-stable-93b717fd81bf6b9a73c3702e9b079b4de8148b34.zip
NFSv4: Label stateids with the type
In order to more easily distinguish what kind of stateid we are dealing with, introduce a type that can be used to label the stateid structure. The label will be useful both for debugging, but also when dealing with operations like SETATTR, READ and WRITE that can take several different types of stateid as arguments. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 196e41e12621..2516467ff17f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -8675,6 +8675,9 @@ nfs41_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp)
static bool nfs41_match_stateid(const nfs4_stateid *s1,
const nfs4_stateid *s2)
{
+ if (s1->type != s2->type)
+ return false;
+
if (memcmp(s1->other, s2->other, sizeof(s1->other)) != 0)
return false;