diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 3875d7b32153b77616c0d45ca7f6961707cedac2..94792667705e8258d8c5bbdba1d07994a1dae72d 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1461,14 +1461,14 @@ repeat: } cleanup: - if (cleanup_phase == 1) /* transaction */ - rc = mds_finish_transno(mds, parent_inode, handle, req, rc, 0); - - if (cleanup_phase == 2) { /* valid lockh */ + switch (cleanup_phase) { + case 2: /* valid lockh */ if (rc == 0) ptlrpc_save_lock(req, &lockh, LCK_EX); else ldlm_lock_decref(&lockh, LCK_EX); + case 1: /* transaction */ + rc = mds_finish_transno(mds, parent_inode, handle, req, rc, 0); } l_dput(new);