diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index d2e5661bc331479cb54660bed1d4c558c94703e1..836fa105f5e3ecb60e5f5d5df804f01f5cfa2991 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -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)