cifs: Save TTL value when parsing DFS referrals
authorPaulo Alcantara <palcantara@suse.de>
Wed, 14 Nov 2018 17:38:51 +0000 (15:38 -0200)
committerSteve French <stfrench@microsoft.com>
Mon, 24 Dec 2018 05:49:00 +0000 (23:49 -0600)
This will be needed by DFS cache.

Signed-off-by: Paulo Alcantara <palcantara@suse.de>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/misc.c

index 7b3b931..3b1aa12 100644 (file)
@@ -1508,6 +1508,7 @@ struct dfs_info3_param {
        int ref_flag;
        char *path_name;
        char *node_name;
+       int ttl;
 };
 
 /*
index f7c0c6f..5e315e4 100644 (file)
@@ -740,6 +740,8 @@ parse_dfs_referrals(struct get_dfs_referral_rsp *rsp, u32 rsp_size,
                        goto parse_DFS_referrals_exit;
                }
 
+               node->ttl = le32_to_cpu(ref->TimeToLive);
+
                ref++;
        }