+/*
+ * We have to close all fd's in open files, we might incorrectly hold a system
+ * level share mode on a file.
+ */
+
+static struct files_struct *close_fsp_fd(struct files_struct *fsp,
+ void *private_data)
+{
+ if ((fsp->fh != NULL) && (fsp->fh->fd != -1)) {
+ close(fsp->fh->fd);
+ fsp->fh->fd = -1;
+ }
+ return NULL;
+}
+