diff mbox series

[v1,06/14] cifs: Save TTL value when parsing DFS referrals

Message ID 20181115142103.24617-7-aaptel@suse.com (mailing list archive)
State New, archived
Headers show
Series DFS failover | expand

Commit Message

Aurélien Aptel Nov. 15, 2018, 2:20 p.m. UTC
From: Paulo Alcantara <paulo@paulo.ac>

This will be needed by DFS cache.

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

Patch

diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 38ab0fca49e1..9534f46e6ad2 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -1508,6 +1508,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 8a41f4eba726..7d8d9423d5ba 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -732,6 +732,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++;
 	}