Blob Blame History Raw
From: Paulo Alcantara <paulo@paulo.ac>
Date: Wed, 14 Nov 2018 15:38:51 -0200
Subject: [PATCH] cifs: Save TTL value when parsing DFS referrals
References: FATE#325270
Patch-mainline: Submitted, linux-cifs 2018-11-15

This will be needed by DFS cache.

Signed-off-by: Paulo Alcantara <palcantara@suse.de>
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Acked-by: Aurelien Aptel <aaptel@suse.com>
---
 fs/cifs/cifsglob.h | 1 +
 fs/cifs/misc.c     | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 42f29d09cf84..73b7a2e6d609 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -1436,6 +1436,7 @@ struct dfs_info3_param {
 	int ref_flag;
 	char *path_name;
 	char *node_name;
+	int ttl;
 };
 
 /*
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index a0dbced4a45c..4ad55651987e 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -718,6 +718,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++;
 	}
 
-- 
2.13.7