Whamcloud - gitweb
- mds_reint_unlink() shouldn't kill slaves if master directory can't be unlinked
authoralex <alex>
Mon, 26 Jul 2004 10:59:34 +0000 (10:59 +0000)
committeralex <alex>
Mon, 26 Jul 2004 10:59:34 +0000 (10:59 +0000)
lustre/mds/mds_reint.c

index d2e5661..836fa10 100644 (file)
@@ -1838,7 +1838,10 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset,
                         mds_open_unlink_rename(rec, obd, dparent, dchild, NULL);
                 }
                 /* handle splitted dir */
-                mds_unlink_slave_objs(obd, dchild);
+                if (rc == 0) {
+                        /* master directory can be non-empty or something else ... */
+                        mds_unlink_slave_objs(obd, dchild);
+                }
                 rc = mds_finish_transno(mds, dparent->d_inode, handle, req,
                                         rc, 0);
                 if (!rc)