Contributors: 9
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Paulo Alcantara |
163 |
68.78% |
6 |
25.00% |
Ronnie Sahlberg |
18 |
7.59% |
7 |
29.17% |
Steve French |
16 |
6.75% |
4 |
16.67% |
Jeff Layton |
12 |
5.06% |
1 |
4.17% |
Pavel Shilovsky |
11 |
4.64% |
1 |
4.17% |
Igor Mammedov |
6 |
2.53% |
2 |
8.33% |
Aurelien Aptel |
6 |
2.53% |
1 |
4.17% |
Miklos Szeredi |
3 |
1.27% |
1 |
4.17% |
Al Viro |
2 |
0.84% |
1 |
4.17% |
Total |
237 |
|
24 |
|
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2022 Paulo Alcantara <palcantara@suse.de>
*/
#ifndef _CIFS_DFS_H
#define _CIFS_DFS_H
#include "cifsglob.h"
#include "fs_context.h"
#include "cifs_unicode.h"
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)
{
return dfs_cache_canonical_path(path, cifs_sb->local_nls, cifs_remap(cifs_sb));
}
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)
{
struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb;
return dfs_cache_find(mnt_ctx->xid, mnt_ctx->root_ses, cifs_sb->local_nls,
cifs_remap(cifs_sb), path, ref, tl);
}
static inline char *dfs_get_automount_devname(struct dentry *dentry, void *page)
{
struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb);
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
struct TCP_Server_Info *server = tcon->ses->server;
if (unlikely(!server->origin_fullpath))
return ERR_PTR(-EREMOTE);
return __build_path_from_dentry_optional_prefix(dentry, page,
server->origin_fullpath,
strlen(server->origin_fullpath),
true);
}
#endif /* _CIFS_DFS_H */