summaryrefslogtreecommitdiff
path: root/fs/smb/client/dfs_cache.h
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-08-17 18:33:59 +0300
committerSteve French <stfrench@microsoft.com>2023-08-21 00:05:49 +0300
commit3fea12f3c67de30fd2e6a3f5da2b5354aa22348e (patch)
treed7d2f789392092aa8bc8cce243995f8becbded51 /fs/smb/client/dfs_cache.h
parent706a741595047797872e669b3101429ab8d378ef (diff)
downloadlinux-3fea12f3c67de30fd2e6a3f5da2b5354aa22348e.tar.xz
smb: client: introduce DFS_CACHE_TGT_LIST()
Add new helper which declares and initialises target list of a DFS referral rather having to do both separately. No functional changes. Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/dfs_cache.h')
-rw-r--r--fs/smb/client/dfs_cache.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/smb/client/dfs_cache.h b/fs/smb/client/dfs_cache.h
index c6d89cd6d4fd..c6abc524855f 100644
--- a/fs/smb/client/dfs_cache.h
+++ b/fs/smb/client/dfs_cache.h
@@ -16,7 +16,11 @@
extern struct workqueue_struct *dfscache_wq;
extern atomic_t dfs_cache_ttl;
-#define DFS_CACHE_TGT_LIST_INIT(var) { .tl_numtgts = 0, .tl_list = LIST_HEAD_INIT((var).tl_list), }
+#define DFS_CACHE_TGT_LIST_INIT(var) \
+ { .tl_numtgts = 0, .tl_list = LIST_HEAD_INIT((var).tl_list), }
+
+#define DFS_CACHE_TGT_LIST(var) \
+ struct dfs_cache_tgt_list var = DFS_CACHE_TGT_LIST_INIT(var)
struct dfs_cache_tgt_list {
int tl_numtgts;