linux/fs/smb/client/dfs.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2022 Paulo Alcantara <[email protected]>
 */

#ifndef _CIFS_DFS_H
#define _CIFS_DFS_H

#include "cifsglob.h"
#include "cifsproto.h"
#include "fs_context.h"
#include "dfs_cache.h"
#include "cifs_unicode.h"
#include <linux/namei.h>

#define DFS_INTERLINK(v)

struct dfs_ref {};

struct dfs_ref_walk {};

#define ref_walk_start(w)
#define ref_walk_end(w)
#define ref_walk_cur(w)
#define ref_walk_descend(w)

#define ref_walk_tit(w)
#define ref_walk_empty(w)
#define ref_walk_path(w)
#define ref_walk_fpath(w)
#define ref_walk_tl(w)

static inline struct dfs_ref_walk *ref_walk_alloc(void)
{}

static inline void ref_walk_init(struct dfs_ref_walk *rw)
{}

static inline void __ref_walk_free(struct dfs_ref *ref)
{}

static inline void ref_walk_free(struct dfs_ref_walk *rw)
{}

static inline int ref_walk_advance(struct dfs_ref_walk *rw)
{}

static inline struct dfs_cache_tgt_iterator *
ref_walk_next_tgt(struct dfs_ref_walk *rw)
{}

static inline int ref_walk_get_tgt(struct dfs_ref_walk *rw,
				   struct dfs_info3_param *tgt)
{}

static inline int ref_walk_num_tgts(struct dfs_ref_walk *rw)
{}

static inline void ref_walk_set_tgt_hint(struct dfs_ref_walk *rw)
{}

int dfs_parse_target_referral(const char *full_path, const struct dfs_info3_param *ref,
			      struct smb3_fs_context *ctx);
int dfs_mount_share(struct cifs_mount_ctx *mnt_ctx, bool *isdfs);

static inline char *dfs_get_path(struct cifs_sb_info *cifs_sb, const char *path)
{}

static inline int dfs_get_referral(struct cifs_mount_ctx *mnt_ctx, const char *path,
				   struct dfs_info3_param *ref, struct dfs_cache_tgt_list *tl)
{}

/*
 * cifs_get_smb_ses() already guarantees an active reference of
 * @ses->dfs_root_ses when a new session is created, so we need to put extra
 * references of all DFS root sessions that were used across the mount process
 * in dfs_mount_share().
 */
static inline void dfs_put_root_smb_sessions(struct cifs_mount_ctx *mnt_ctx)
{}

#endif /* _CIFS_DFS_H */