@@ -1025,66 +1025,6 @@ int dfs_cache_noreq_find(const char *path, struct dfs_info3_param *ref,
1025
1025
return rc ;
1026
1026
}
1027
1027
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
-
1088
1028
/**
1089
1029
* dfs_cache_noreq_update_tgthint - update target hint of a DFS cache entry
1090
1030
* without sending any requests to the currently connected server.
0 commit comments