summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2021-06-04 19:25:28 -0300
committerSteve French <stfrench@microsoft.com>2021-06-20 21:28:16 -0500
commit2b133b7e216b9dae42fe504c7aa090363d96745a (patch)
treea2abe5d16e917af875deb1685df2b57e713cc169
parentf3191fc8004d6d200d850395bbad8dab8f367945 (diff)
downloadlinux-2b133b7e216b9dae42fe504c7aa090363d96745a.tar.gz
linux-2b133b7e216b9dae42fe504c7aa090363d96745a.tar.bz2
linux-2b133b7e216b9dae42fe504c7aa090363d96745a.zip
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) <pc@cjr.nz> Reviewed-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/cifs/dfs_cache.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 03c81c39a507..70383e14ca4a 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -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;
@@ -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);
@@ -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;
@@ -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;