diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index 0a97228c06b1e..fb6a2eed58567 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -2571,7 +2571,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) if (ses->server->dialect >= SMB20_PROT_ID && (ses->server->capabilities & SMB2_GLOBAL_CAP_DIRECTORY_LEASING)) - nohandlecache = ctx->nohandlecache; + nohandlecache = ctx->nohandlecache || !dir_cache_timeout; else nohandlecache = true; tcon = tcon_info_alloc(!nohandlecache, netfs_trace_tcon_ref_new);