aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4session.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4session.c')
-rw-r--r--fs/nfs/nfs4session.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c
index b62973045a3e..a61350f75c74 100644
--- a/fs/nfs/nfs4session.c
+++ b/fs/nfs/nfs4session.c
@@ -178,12 +178,14 @@ static int nfs4_slot_get_seqid(struct nfs4_slot_table *tbl, u32 slotid,
178 __must_hold(&tbl->slot_tbl_lock) 178 __must_hold(&tbl->slot_tbl_lock)
179{ 179{
180 struct nfs4_slot *slot; 180 struct nfs4_slot *slot;
181 int ret;
181 182
182 slot = nfs4_lookup_slot(tbl, slotid); 183 slot = nfs4_lookup_slot(tbl, slotid);
183 if (IS_ERR(slot)) 184 ret = PTR_ERR_OR_ZERO(slot);
184 return PTR_ERR(slot); 185 if (!ret)
185 *seq_nr = slot->seq_nr; 186 *seq_nr = slot->seq_nr;
186 return 0; 187
188 return ret;
187} 189}
188 190
189/* 191/*
@@ -196,7 +198,7 @@ static int nfs4_slot_get_seqid(struct nfs4_slot_table *tbl, u32 slotid,
196static bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl, 198static bool nfs4_slot_seqid_in_use(struct nfs4_slot_table *tbl,
197 u32 slotid, u32 seq_nr) 199 u32 slotid, u32 seq_nr)
198{ 200{
199 u32 cur_seq; 201 u32 cur_seq = 0;
200 bool ret = false; 202 bool ret = false;
201 203
202 spin_lock(&tbl->slot_tbl_lock); 204 spin_lock(&tbl->slot_tbl_lock);