Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-13368 lnet: discard the callback
[fs/lustre-release.git]
/
lustre
/
include
/
lustre_net.h
diff --git
a/lustre/include/lustre_net.h
b/lustre/include/lustre_net.h
index
7dad281
..
f34a272
100644
(file)
--- a/
lustre/include/lustre_net.h
+++ b/
lustre/include/lustre_net.h
@@
-2501,8
+2501,10
@@
ptlrpc_client_recv(struct ptlrpc_request *req)
return req->rq_receiving_reply;
}
return req->rq_receiving_reply;
}
+#define ptlrpc_cli_wait_unlink(req) __ptlrpc_cli_wait_unlink(req, NULL)
+
static inline int
static inline int
-
ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req
)
+
__ptlrpc_cli_wait_unlink(struct ptlrpc_request *req, bool *discard
)
{
int rc;
{
int rc;
@@
-2516,6
+2518,15
@@
ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req)
return 1;
}
return 1;
}
+ if (discard) {
+ *discard = false;
+ if (req->rq_reply_unlinked && req->rq_req_unlinked == 0) {
+ *discard = true;
+ spin_unlock(&req->rq_lock);
+ return 1; /* Should call again after LNetMDUnlink */
+ }
+ }
+
rc = !req->rq_req_unlinked || !req->rq_reply_unlinked ||
req->rq_receiving_reply;
spin_unlock(&req->rq_lock);
rc = !req->rq_req_unlinked || !req->rq_reply_unlinked ||
req->rq_receiving_reply;
spin_unlock(&req->rq_lock);