Skip to content

Commit a1b7c84

Browse files
Paulo Alcantarasmfrench
authored andcommitted
cifs: remove unused function
Remove dfs_cache_update_tgthint() as it is not used anywhere. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 30b2b21 commit a1b7c84

File tree

2 files changed

+0
-63
lines changed

2 files changed

+0
-63
lines changed

fs/cifs/dfs_cache.c

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,66 +1025,6 @@ int dfs_cache_noreq_find(const char *path, struct dfs_info3_param *ref,
10251025
return rc;
10261026
}
10271027

1028-
/**
1029-
* dfs_cache_update_tgthint - update target hint of a DFS cache entry
1030-
*
1031-
* If it doesn't find the cache entry, then it will get a DFS referral for @path
1032-
* and create a new entry.
1033-
*
1034-
* In case the cache entry exists but expired, it will get a DFS referral
1035-
* for @path and then update the respective cache entry.
1036-
*
1037-
* @xid: syscall id
1038-
* @ses: smb session
1039-
* @cp: codepage
1040-
* @remap: type of character remapping for paths
1041-
* @path: path to lookup in DFS referral cache
1042-
* @it: DFS target iterator
1043-
*
1044-
* Return zero if the target hint was updated successfully, otherwise non-zero.
1045-
*/
1046-
int dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses,
1047-
const struct nls_table *cp, int remap, const char *path,
1048-
const struct dfs_cache_tgt_iterator *it)
1049-
{
1050-
struct cache_dfs_tgt *t;
1051-
struct cache_entry *ce;
1052-
const char *npath;
1053-
int rc = 0;
1054-
1055-
npath = dfs_cache_canonical_path(path, cp, remap);
1056-
if (IS_ERR(npath))
1057-
return PTR_ERR(npath);
1058-
1059-
cifs_dbg(FYI, "%s: update target hint - path: %s\n", __func__, npath);
1060-
1061-
ce = cache_refresh_path(xid, ses, npath, false);
1062-
if (IS_ERR(ce)) {
1063-
rc = PTR_ERR(ce);
1064-
goto out_free_path;
1065-
}
1066-
1067-
t = READ_ONCE(ce->tgthint);
1068-
1069-
if (likely(!strcasecmp(it->it_name, t->name)))
1070-
goto out_unlock;
1071-
1072-
list_for_each_entry(t, &ce->tlist, list) {
1073-
if (!strcasecmp(t->name, it->it_name)) {
1074-
WRITE_ONCE(ce->tgthint, t);
1075-
cifs_dbg(FYI, "%s: new target hint: %s\n", __func__,
1076-
it->it_name);
1077-
break;
1078-
}
1079-
}
1080-
1081-
out_unlock:
1082-
up_read(&htable_rw_lock);
1083-
out_free_path:
1084-
kfree(npath);
1085-
return rc;
1086-
}
1087-
10881028
/**
10891029
* dfs_cache_noreq_update_tgthint - update target hint of a DFS cache entry
10901030
* without sending any requests to the currently connected server.

fs/cifs/dfs_cache.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, const struct nl
3535
struct dfs_cache_tgt_list *tgt_list);
3636
int dfs_cache_noreq_find(const char *path, struct dfs_info3_param *ref,
3737
struct dfs_cache_tgt_list *tgt_list);
38-
int dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses,
39-
const struct nls_table *cp, int remap, const char *path,
40-
const struct dfs_cache_tgt_iterator *it);
4138
void dfs_cache_noreq_update_tgthint(const char *path, const struct dfs_cache_tgt_iterator *it);
4239
int dfs_cache_get_tgt_referral(const char *path, const struct dfs_cache_tgt_iterator *it,
4340
struct dfs_info3_param *ref);

0 commit comments

Comments
 (0)