|
@@ -760,6 +760,24 @@ int cifs_close(struct inode *inode, struct file *file)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void
|
|
|
|
+cifs_reopen_persistent_handles(struct cifs_tcon *tcon)
|
|
|
|
+{
|
|
|
|
+ struct cifsFileInfo *open_file = NULL;
|
|
|
|
+ struct list_head *tmp;
|
|
|
|
+ struct list_head *tmp1;
|
|
|
|
+
|
|
|
|
+ /* list all files open on tree connection, reopen resilient handles */
|
|
|
|
+ spin_lock(&tcon->open_file_lock);
|
|
|
|
+ list_for_each_safe(tmp, tmp1, &tcon->openFileList) {
|
|
|
|
+ open_file = list_entry(tmp, struct cifsFileInfo, tlist);
|
|
|
|
+ spin_unlock(&tcon->open_file_lock);
|
|
|
|
+ cifs_reopen_file(open_file, false /* do not flush */);
|
|
|
|
+ spin_lock(&tcon->open_file_lock);
|
|
|
|
+ }
|
|
|
|
+ spin_unlock(&tcon->open_file_lock);
|
|
|
|
+}
|
|
|
|
+
|
|
int cifs_closedir(struct inode *inode, struct file *file)
|
|
int cifs_closedir(struct inode *inode, struct file *file)
|
|
{
|
|
{
|
|
int rc = 0;
|
|
int rc = 0;
|