Whamcloud - gitweb
- correct some return value.
[fs/lustre-release.git] / lustre / mds / mds_unlink_open.c
index a3d8837..c480885 100644 (file)
@@ -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) {