aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwang di <[email protected]>2016-08-16 16:18:19 -0400
committerGreg Kroah-Hartman <[email protected]>2016-08-21 15:57:33 +0200
commita0d73eb569cd4fee48d35b9ce636587fa05ed145 (patch)
treec09ee6978a2169bfa162638ee8ee74a660edaae2
parent77a782ab70d3a35812f6ad0e13e5cea72b3b6694 (diff)
staging: lustre: mdc: don't take rpc lock for readdir case
If the operation is IT_READDIR don't need to handle the mdc RPC lock. Signed-off-by: wang di <[email protected]> Reviewed-on: http://review.whamcloud.com/10761 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906 Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/lustre/lustre/include/lustre_mdc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h
index fa62b95d351f..0a8c6391b91d 100644
--- a/drivers/staging/lustre/lustre/include/lustre_mdc.h
+++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h
@@ -96,7 +96,7 @@ static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
struct lookup_intent *it)
{
if (it && (it->it_op == IT_GETATTR || it->it_op == IT_LOOKUP ||
- it->it_op == IT_LAYOUT))
+ it->it_op == IT_LAYOUT || it->it_op == IT_READDIR))
return;
/* This would normally block until the existing request finishes.
@@ -136,7 +136,7 @@ static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
struct lookup_intent *it)
{
if (it && (it->it_op == IT_GETATTR || it->it_op == IT_LOOKUP ||
- it->it_op == IT_LAYOUT))
+ it->it_op == IT_LAYOUT || it->it_op == IT_READDIR))
return;
if (lck->rpcl_it == MDC_FAKE_RPCL_IT) { /* OBD_FAIL_MDC_RPCS_SEM */