unlink/rmdir if another process still has it open.
Jeremy, this is a potential merger to 3.0.24.
Volker
delete_dir = (lck->delete_on_close | lck->initial_delete_on_close);
+ if (delete_dir) {
+ int i;
+ /* See if others still have the dir open. If this is the
+ * case, then don't delete */
+ for (i=0; i<lck->num_share_modes; i++) {
+ if (is_valid_share_mode_entry(&lck->share_modes[i])) {
+ delete_dir = False;
+ break;
+ }
+ }
+ }
+
if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) &&
delete_dir &&
lck->delete_token) {