From 70136ab9c2b1c88b4258745e382341a172c69a23 Mon Sep 17 00:00:00 2001 From: yury <yury> Date: Mon, 25 Aug 2008 12:44:58 +0000 Subject: [PATCH] - some cleanups to patch from 11190 --- lustre/mdt/mdt_handler.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index a3e44b1115..271a0735f9 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -2851,9 +2851,6 @@ out_shrink: return rc; } -#define IS_CLIENT_DISCONNECT_ERROR(error) \ - (error == -ENOTCONN || error == -ENODEV) - static int mdt_intent_reint(enum mdt_it_code opcode, struct mdt_thread_info *info, struct ldlm_lock **lockp, @@ -2906,13 +2903,12 @@ static int mdt_intent_reint(enum mdt_it_code opcode, rep->lock_policy_res2 = clear_serious(rc); lhc->mlh_reg_lh.cookie = 0ull; - if (IS_CLIENT_DISCONNECT_ERROR(rc)){ + if (rc == -ENOTCONN || rc == -ENODEV) { /* - * If it is the disconnect error (ENODEV & ENOCONN), - * the error will be returned by rq_stats, and client - * ptlrpc layer will detect this, then disconnect, - * reconnect the import immediately, instead of impacting - * the following the rpc. + * If it is the disconnect error (ENODEV & ENOCONN), the error + * will be returned by rq_status, and client at ptlrpc layer + * will detect this, then disconnect, reconnect the import + * immediately, instead of impacting the following the rpc. */ RETURN(rc); } else { -- GitLab