Commit e511d317 authored by Paulo Alcantara's avatar Paulo Alcantara Committed by Steve French

cifs: start DFS cache refresher in cifs_mount()

Start the DFS cache refresh worker per volume during cifs mount.
Signed-off-by: default avatarPaulo Alcantara <palcantara@suse.de>
Reviewed-by: default avatarAurelien Aptel <aaptel@suse.de>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 2f0a6174
...@@ -4594,6 +4594,11 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol) ...@@ -4594,6 +4594,11 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol)
} }
spin_unlock(&cifs_tcp_ses_lock); 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 * After reconnecting to a different server, unique ids won't
* match anymore, so we disable serverino. This prevents * match anymore, so we disable serverino. This prevents
...@@ -4836,6 +4841,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb) ...@@ -4836,6 +4841,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
kfree(cifs_sb->mountdata); kfree(cifs_sb->mountdata);
kfree(cifs_sb->prepath); kfree(cifs_sb->prepath);
#ifdef CONFIG_CIFS_DFS_UPCALL #ifdef CONFIG_CIFS_DFS_UPCALL
dfs_cache_del_vol(cifs_sb->origin_fullpath);
kfree(cifs_sb->origin_fullpath); kfree(cifs_sb->origin_fullpath);
#endif #endif
call_rcu(&cifs_sb->rcu, delayed_free); call_rcu(&cifs_sb->rcu, delayed_free);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment