As this is basically the same issue that prompted the use of
silly-rename for files, we could handle it similarly -- maybe use a
different silly name stem for the directories. Alternatively (and
simpler) is to just check for d_count > 1 and return EBUSY. I've added
this to my sources, and it stops the mode changes, but might have side
effects if some software depends on removing directories still in use.
Anyway, we need to handle it in some fashion, as the mode change error
is meant only to catch irrecoverable errors. (E.g. someone messing
around on the server behind our backs.)
Regards,
Bill