Skip to content

Commit

Permalink
cifs: start DFS cache refresher in cifs_mount()
Browse files Browse the repository at this point in the history
Start the DFS cache refresh worker per volume during cifs mount.

Signed-off-by: Paulo Alcantara <[email protected]>
Reviewed-by: Aurelien Aptel <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
Paulo Alcantara authored and Steve French committed Dec 28, 2018
1 parent 2f0a617 commit e511d31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -4594,6 +4594,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
Expand Down Expand Up @@ -4836,6 +4841,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);
Expand Down

0 comments on commit e511d31

Please sign in to comment.