}
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) {
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;
}