X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmds%2Fmds_unlink_open.c;h=c48088588ecee405151c2bdaa3b3138cdd6e0342;hb=92313fed3b98345c96298cb4445b872dec7b224b;hp=a3d8837be8461f3e04e4f2a6f591ad8b8fda0eec;hpb=9b4f310275dcb64e586514fdbbf467b5d3fe3ad9;p=fs%2Flustre-release.git diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c index a3d8837..c480885 100644 --- a/lustre/mds/mds_unlink_open.c +++ b/lustre/mds/mds_unlink_open.c @@ -83,8 +83,10 @@ mds_unlink_object(struct mds_obd *mds, struct inode *inode, CDEBUG(D_INODE, "destroy OSS object %d/%d\n", (int)oa->o_id, (int)oa->o_gr); + + if (async) + oti.oti_flags |= OBD_MODE_ASYNC; - oti.oti_async = async; rc = obd_destroy(mds->mds_dt_exp, oa, lsm, &oti); obdo_free(oa); out_free_memmd: @@ -236,13 +238,11 @@ int mds_cleanup_orphans(struct obd_device *obd) child_inode = dchild->d_inode; DOWN_READ_I_ALLOC_SEM(child_inode); - if (mds_inode_is_orphan(child_inode) && - mds_orphan_open_count(child_inode)) { + if (mds_orphan_open_count(child_inode)) { UP_READ_I_ALLOC_SEM(child_inode); CWARN("orphan %s re-opened during recovery\n", d_name); GOTO(next, rc = 0); } - mds_inode_unset_orphan(child_inode); UP_READ_I_ALLOC_SEM(child_inode); rc = mds_unlink_orphan(obd, dchild, child_inode, pending_dir); if (rc == 0) {