Merge tag 'ktest-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux-2.6-microblaze.git] / fs / cifs / dfs_cache.c
index 2b77d39..6ad6ba5 100644 (file)
@@ -18,9 +18,9 @@
 #include "cifs_debug.h"
 #include "cifs_unicode.h"
 #include "smb2glob.h"
+#include "fs_context.h"
 
 #include "dfs_cache.h"
-#include "fs_context.h"
 
 #define CACHE_HTABLE_SIZE 32
 #define CACHE_MAX_ENTRIES 64
@@ -587,7 +587,7 @@ static void __vol_release(struct vol_info *vi)
 {
        kfree(vi->fullpath);
        kfree(vi->mntdata);
-       cifs_cleanup_volume_info_contents(&vi->ctx);
+       smb3_cleanup_fs_context_contents(&vi->ctx);
        kfree(vi);
 }
 
@@ -1142,14 +1142,14 @@ out_unlock:
 }
 
 /**
- * dfs_cache_add_vol - add a cifs volume during mount() that will be handled by
+ * dfs_cache_add_vol - add a cifs context during mount() that will be handled by
  * DFS cache refresh worker.
  *
  * @mntdata: mount data.
  * @ctx: cifs context.
  * @fullpath: origin full path.
  *
- * Return zero if volume was set up correctly, otherwise non-zero.
+ * Return zero if context was set up correctly, otherwise non-zero.
  */
 int dfs_cache_add_vol(char *mntdata, struct smb3_fs_context *ctx, const char *fullpath)
 {
@@ -1416,7 +1416,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi,
        int rc;
        struct cache_entry *ce;
        struct dfs_info3_param ref = {0};
-       char *mdata = NULL, *devname = NULL;
+       char *mdata = NULL;
        struct TCP_Server_Info *server;
        struct cifs_ses *ses;
        struct smb3_fs_context ctx = {NULL};
@@ -1443,8 +1443,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi,
 
        up_read(&htable_rw_lock);
 
-       mdata = cifs_compose_mount_options(vi->mntdata, rpath, &ref,
-                                          &devname);
+       mdata = cifs_compose_mount_options(vi->mntdata, rpath, &ref);
        free_dfs_info_param(&ref);
 
        if (IS_ERR(mdata)) {
@@ -1453,8 +1452,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi,
                goto out;
        }
 
-       rc = cifs_setup_volume_info(&ctx, mdata, devname, false);
-       kfree(devname);
+       rc = cifs_setup_volume_info(&ctx);
 
        if (rc) {
                ses = ERR_PTR(rc);
@@ -1470,7 +1468,7 @@ static struct cifs_ses *find_root_ses(struct vol_info *vi,
        ses = cifs_get_smb_ses(server, &ctx);
 
 out:
-       cifs_cleanup_volume_info_contents(&ctx);
+       smb3_cleanup_fs_context_contents(&ctx);
        kfree(mdata);
        kfree(rpath);