]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/cifs/cifsfs.c
cifs: factor smb_vol allocation out of cifs_setup_volume_info
[mirror_ubuntu-bionic-kernel.git] / fs / cifs / cifsfs.c
index 35f9154615fa5ca7cc01fe857324b640b9533245..3e2989976297bf654649055f67ca2007e3d71733 100644 (file)
@@ -649,9 +649,9 @@ cifs_do_mount(struct file_system_type *fs_type,
 
        cFYI(1, "Devname: %s flags: %d ", dev_name, flags);
 
-       rc = cifs_setup_volume_info(&volume_info, (char *)data, dev_name);
-       if (rc)
-               return ERR_PTR(rc);
+       volume_info = cifs_get_volume_info((char *)data, dev_name);
+       if (IS_ERR(volume_info))
+               return ERR_CAST(volume_info);
 
        cifs_sb = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL);
        if (cifs_sb == NULL) {
@@ -713,7 +713,7 @@ cifs_do_mount(struct file_system_type *fs_type,
 out_super:
        deactivate_locked_super(sb);
 out:
-       cifs_cleanup_volume_info(&volume_info);
+       cifs_cleanup_volume_info(volume_info);
        return root;
 
 out_mountdata: