From a9bf077545ce31f2d4889ffa983442e5be1a997a Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 11 Mar 2005 18:24:01 +0000 Subject: [PATCH] - fixed using not initialized ctxt with pop_ctxt() in mds_lock_and_check_slave() --- lustre/mds/mds_lmv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lustre/mds/mds_lmv.c b/lustre/mds/mds_lmv.c index e406fd7..0287b11 100644 --- a/lustre/mds/mds_lmv.c +++ b/lustre/mds/mds_lmv.c @@ -1169,11 +1169,10 @@ int mds_lock_and_check_slave(int offset, struct ptlrpc_request *req, } push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); + rc = mds_is_dir_empty(obd, dentry) ? 0 : -ENOTEMPTY; + pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - rc = 0; - if (!mds_is_dir_empty(obd, dentry)) - rc = -ENOTEMPTY; - + mds_exit_ucred(&uc); EXIT; cleanup: switch(cleanup_phase) { @@ -1181,8 +1180,6 @@ cleanup: if (rc) ldlm_lock_decref(lockh, LCK_EX); l_dput(dentry); - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc); - mds_exit_ucred(&uc); default: break; } -- 1.8.3.1