aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-12-04 15:55:29 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-04 15:55:29 -0500
commite608e79f1bf4b967afcf57777e63b5f0939b00e8 (patch)
treed649b5714435b7d2d4edd5779fa22122d61ee0c5 /fs/nfs/internal.h
parent1d9ddde94aed01c4618cf6f70883cc511c3b2b62 (diff)
nfs41: call free slot from nfs4_restart_rpc
nfs41_sequence_free_slot can be called multiple times on SEQUENCE operation errors. No reason to inline nfs4_restart_rpc Reported-by: Trond Myklebust <trond.myklebust@netapp.com> nfs_writeback_done and nfs_readpage_retry call nfs4_restart_rpc outside the error handler, and the slot is not freed prior to restarting in the rpc_prepare state during session reset. Fix this by moving the call to nfs41_sequence_free_slot from the error path of nfs41_sequence_done into nfs4_restart_rpc, and by removing the test for NFS4CLNT_SESSION_SETUP. Always free slot and goto the rpc prepare state on async errors. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index ebcd3795389e..a6f7b6cbfd09 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -177,26 +177,14 @@ extern __be32 * nfs_decode_dirent(__be32 *, struct nfs_entry *, int);
177extern struct rpc_procinfo nfs3_procedures[]; 177extern struct rpc_procinfo nfs3_procedures[];
178extern __be32 *nfs3_decode_dirent(__be32 *, struct nfs_entry *, int); 178extern __be32 *nfs3_decode_dirent(__be32 *, struct nfs_entry *, int);
179 179
180/* nfs4proc.c */
181static inline void nfs4_restart_rpc(struct rpc_task *task,
182 const struct nfs_client *clp)
183{
184#ifdef CONFIG_NFS_V4_1
185 if (nfs4_has_session(clp) &&
186 test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) {
187 rpc_restart_call_prepare(task);
188 return;
189 }
190#endif /* CONFIG_NFS_V4_1 */
191 rpc_restart_call(task);
192}
193
194/* nfs4xdr.c */ 180/* nfs4xdr.c */
195#ifdef CONFIG_NFS_V4 181#ifdef CONFIG_NFS_V4
196extern __be32 *nfs4_decode_dirent(__be32 *p, struct nfs_entry *entry, int plus); 182extern __be32 *nfs4_decode_dirent(__be32 *p, struct nfs_entry *entry, int plus);
197#endif 183#endif
198 184
199/* nfs4proc.c */ 185/* nfs4proc.c */
186extern void nfs4_restart_rpc(struct rpc_task *, const struct nfs_client *,
187 struct nfs4_sequence_res *);
200#ifdef CONFIG_NFS_V4 188#ifdef CONFIG_NFS_V4
201extern struct rpc_procinfo nfs4_procedures[]; 189extern struct rpc_procinfo nfs4_procedures[];
202#endif 190#endif