Skip to content

Commit

Permalink
cifs: get rid of @noreq param in __dfs_cache_find()
Browse files Browse the repository at this point in the history
@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]>
  • Loading branch information
pcacjr authored and Steve French committed Jun 21, 2021
1 parent f3191fc commit 2b133b7
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions fs/cifs/dfs_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,7 @@ static int update_cache_entry(const char *path,
* handle them properly.
*/
static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
const struct nls_table *nls_codepage, int remap,
const char *path, bool noreq)
const struct nls_table *nls_codepage, int remap, const char *path)
{
int rc;
unsigned int hash;
Expand All @@ -705,16 +704,6 @@ static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
down_read(&htable_rw_lock);

ce = lookup_cache_entry(path, &hash);

/*
* If @noreq is set, no requests will be sent to the server. Just return
* the cache entry.
*/
if (noreq) {
up_read(&htable_rw_lock);
return PTR_ERR_OR_ZERO(ce);
}

if (!IS_ERR(ce)) {
if (!cache_entry_expired(ce)) {
dump_ce(ce);
Expand Down Expand Up @@ -879,7 +868,7 @@ int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
if (rc)
return rc;

rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath, false);
rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath);
if (rc)
goto out_free_path;

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

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

rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath, false);
rc = __dfs_cache_find(xid, ses, nls_codepage, remap, npath);
if (rc)
goto out_free_path;

Expand Down

0 comments on commit 2b133b7

Please sign in to comment.