Skip to content

Commit 2b133b7

Browse files
Paulo AlcantaraSteve French
authored andcommitted
cifs: get rid of @noreq param in __dfs_cache_find()
@noreq param isn't used anywhere, so just remove it. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent f3191fc commit 2b133b7

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

fs/cifs/dfs_cache.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,7 @@ static int update_cache_entry(const char *path,
690690
* handle them properly.
691691
*/
692692
static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
693-
const struct nls_table *nls_codepage, int remap,
694-
const char *path, bool noreq)
693+
const struct nls_table *nls_codepage, int remap, const char *path)
695694
{
696695
int rc;
697696
unsigned int hash;
@@ -705,16 +704,6 @@ static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
705704
down_read(&htable_rw_lock);
706705

707706
ce = lookup_cache_entry(path, &hash);
708-
709-
/*
710-
* If @noreq is set, no requests will be sent to the server. Just return
711-
* the cache entry.
712-
*/
713-
if (noreq) {
714-
up_read(&htable_rw_lock);
715-
return PTR_ERR_OR_ZERO(ce);
716-
}
717-
718707
if (!IS_ERR(ce)) {
719708
if (!cache_entry_expired(ce)) {
720709
dump_ce(ce);
@@ -879,7 +868,7 @@ int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
879868
if (rc)
880869
return rc;
881870

882-
rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath, false);
871+
rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath);
883872
if (rc)
884873
goto out_free_path;
885874

@@ -991,7 +980,7 @@ int dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses,
991980

992981
cifs_dbg(FYI, "%s: update target hint - path: %s\n", __func__, npath);
993982

994-
rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath, false);
983+
rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath);
995984
if (rc)
996985
goto out_free_path;
997986

0 commit comments

Comments
 (0)