Skip to content

Commit e511d31

Browse files
Paulo Alcantarasmfrench
authored andcommitted
cifs: start DFS cache refresher in cifs_mount()
Start the DFS cache refresh worker per volume during cifs mount. Signed-off-by: Paulo Alcantara <palcantara@suse.de> Reviewed-by: Aurelien Aptel <aaptel@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 2f0a617 commit e511d31

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/cifs/connect.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4594,6 +4594,11 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol)
45944594
}
45954595
spin_unlock(&cifs_tcp_ses_lock);
45964596

4597+
rc = dfs_cache_add_vol(vol, cifs_sb->origin_fullpath);
4598+
if (rc) {
4599+
kfree(cifs_sb->origin_fullpath);
4600+
goto error;
4601+
}
45974602
/*
45984603
* After reconnecting to a different server, unique ids won't
45994604
* match anymore, so we disable serverino. This prevents
@@ -4836,6 +4841,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
48364841
kfree(cifs_sb->mountdata);
48374842
kfree(cifs_sb->prepath);
48384843
#ifdef CONFIG_CIFS_DFS_UPCALL
4844+
dfs_cache_del_vol(cifs_sb->origin_fullpath);
48394845
kfree(cifs_sb->origin_fullpath);
48404846
#endif
48414847
call_rcu(&cifs_sb->rcu, delayed_free);

0 commit comments

Comments
 (0)