diff mbox series

[1/5] cifs: get rid of cifs_mount_ctx::{origin,leaf}_fullpath

Message ID 20230329201423.32134-1-pc@manguebit.com (mailing list archive)
State New, archived
Headers show
Series [1/5] cifs: get rid of cifs_mount_ctx::{origin,leaf}_fullpath | expand

Commit Message

Paulo Alcantara March 29, 2023, 8:14 p.m. UTC
leaf_fullpath is now part of smb3_fs_context structure, while
origin_fullpath is just a variable in __dfs_mount_share() that is used
when final tcon is available.

Get rid of those fields in cifs_mount_ctx structure and no-op
kfree()'s.

Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
---
 fs/cifs/cifsglob.h | 1 -
 fs/cifs/connect.c  | 2 --
 2 files changed, 3 deletions(-)

Comments

ronnie sahlberg March 29, 2023, 8:24 p.m. UTC | #1
Reviewed-by me

On Thu, 30 Mar 2023 at 06:20, Paulo Alcantara <pc@manguebit.com> wrote:
>
> leaf_fullpath is now part of smb3_fs_context structure, while
> origin_fullpath is just a variable in __dfs_mount_share() that is used
> when final tcon is available.
>
> Get rid of those fields in cifs_mount_ctx structure and no-op
> kfree()'s.
>
> Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
> ---
>  fs/cifs/cifsglob.h | 1 -
>  fs/cifs/connect.c  | 2 --
>  2 files changed, 3 deletions(-)
>
> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> index 08a73dcb7786..c5e3a0fc7983 100644
> --- a/fs/cifs/cifsglob.h
> +++ b/fs/cifs/cifsglob.h
> @@ -1750,7 +1750,6 @@ struct cifs_mount_ctx {
>         struct TCP_Server_Info *server;
>         struct cifs_ses *ses;
>         struct cifs_tcon *tcon;
> -       char *origin_fullpath, *leaf_fullpath;
>         struct list_head dfs_ses_list;
>  };
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 1cbb90587995..ef50f603e640 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -3454,8 +3454,6 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx)
>
>  error:
>         dfs_put_root_smb_sessions(&mnt_ctx.dfs_ses_list);
> -       kfree(mnt_ctx.origin_fullpath);
> -       kfree(mnt_ctx.leaf_fullpath);
>         cifs_mount_put_conns(&mnt_ctx);
>         return rc;
>  }
> --
> 2.40.0
>
diff mbox series

Patch

diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 08a73dcb7786..c5e3a0fc7983 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -1750,7 +1750,6 @@  struct cifs_mount_ctx {
 	struct TCP_Server_Info *server;
 	struct cifs_ses *ses;
 	struct cifs_tcon *tcon;
-	char *origin_fullpath, *leaf_fullpath;
 	struct list_head dfs_ses_list;
 };
 
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 1cbb90587995..ef50f603e640 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3454,8 +3454,6 @@  int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx)
 
 error:
 	dfs_put_root_smb_sessions(&mnt_ctx.dfs_ses_list);
-	kfree(mnt_ctx.origin_fullpath);
-	kfree(mnt_ctx.leaf_fullpath);
 	cifs_mount_put_conns(&mnt_ctx);
 	return rc;
 }