aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorLiang Zhen <liang.zhen@intel.com>2014-02-28 21:16:40 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-28 19:13:21 -0800
commit503a1ac74aa4e5b63d2a283b82f26684ce812b64 (patch)
tree5f0cf06989cf01a2512f2104bf0b7d2cc9ffde53 /drivers/staging/lustre
parente3bceb234ed611478fb02a41f928c7697cbe0524 (diff)
downloadlinux-503a1ac74aa4e5b63d2a283b82f26684ce812b64.tar.gz
lustre/ptlrpc: rq_commit_cb is called for twice
If a ptlrpc_request is already on imp::imp_replay_list, when it's replayed and replied, after_reply() will call req::rq_commit_cb for the request, then call it again in ptlrpc_free_committed. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Reviewed-on: http://review.whamcloud.com/8815 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3618 Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c
index e1e121b785b9..4c9e00695087 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
@@ -1316,7 +1316,11 @@ static int after_reply(struct ptlrpc_request *req)
/** version recovery */
ptlrpc_save_versions(req);
ptlrpc_retain_replayable_request(req, imp);
- } else if (req->rq_commit_cb != NULL) {
+ } else if (req->rq_commit_cb != NULL &&
+ list_empty(&req->rq_replay_list)) {
+ /* NB: don't call rq_commit_cb if it's already on
+ * rq_replay_list, ptlrpc_free_committed() will call
+ * it later, see LU-3618 for details */
spin_unlock(&imp->imp_lock);
req->rq_commit_cb(req);
spin_lock(&imp->imp_lock);