mds: fix assert(omap_num_objs <= MAX_OBJECTS) of OpenFileTable
Current behavior of the loop that commits dirty items is:
- If the last object is not full, it will be chosen for new item.
- If the last object becomes full, a new object is allocated, which
becomes the new last object.
Above logical can make object count increase even there is free object.