[PATCH v1 12/14] cifs: start DFS cache refresher in cifs_mount()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Paulo Alcantara <paulo@xxxxxxxx>

Start the DFS cache refresh worker per volume during cifs mount.

Signed-off-by: Paulo Alcantara <palcantara@xxxxxxx>
Signed-off-by: Aurelien Aptel <aaptel@xxxxxxxx>
---
 fs/cifs/connect.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 52d837d7bf57..93fd8cbe0e08 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -4581,6 +4581,11 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol)
 	}
 	spin_unlock(&cifs_tcp_ses_lock);
 
+	rc = dfs_cache_add_vol(vol, cifs_sb->origin_fullpath);
+	if (rc) {
+		kfree(cifs_sb->origin_fullpath);
+		goto error;
+	}
 	/*
 	 * After reconnecting to a different server, unique ids won't
 	 * match anymore, so we disable serverino. This prevents
@@ -4823,6 +4828,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
 	kfree(cifs_sb->mountdata);
 	kfree(cifs_sb->prepath);
 #ifdef CONFIG_CIFS_DFS_UPCALL
+	dfs_cache_del_vol(cifs_sb->origin_fullpath);
 	kfree(cifs_sb->origin_fullpath);
 #endif
 	call_rcu(&cifs_sb->rcu, delayed_free);
-- 
2.13.7




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux