Skip to content

Commit 2301bc1

Browse files
Paulo Alcantarasmfrench
authored andcommitted
cifs: remove unused smb3_fs_context::mount_options
Just remove it as it's no longer used during mount. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent abdb174 commit 2301bc1

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

fs/cifs/fs_context.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx
308308
{
309309
memcpy(new_ctx, ctx, sizeof(*ctx));
310310
new_ctx->prepath = NULL;
311-
new_ctx->mount_options = NULL;
312311
new_ctx->nodename = NULL;
313312
new_ctx->username = NULL;
314313
new_ctx->password = NULL;
@@ -321,7 +320,6 @@ smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx
321320
* Make sure to stay in sync with smb3_cleanup_fs_context_contents()
322321
*/
323322
DUP_CTX_STR(prepath);
324-
DUP_CTX_STR(mount_options);
325323
DUP_CTX_STR(username);
326324
DUP_CTX_STR(password);
327325
DUP_CTX_STR(server_hostname);
@@ -569,17 +567,12 @@ static const struct fs_context_operations smb3_fs_context_ops = {
569567
static int smb3_fs_context_parse_monolithic(struct fs_context *fc,
570568
void *data)
571569
{
572-
struct smb3_fs_context *ctx = smb3_fc2context(fc);
573570
char *options = data, *key;
574571
int ret = 0;
575572

576573
if (!options)
577574
return 0;
578575

579-
ctx->mount_options = kstrdup(data, GFP_KERNEL);
580-
if (ctx->mount_options == NULL)
581-
return -ENOMEM;
582-
583576
ret = security_sb_eat_lsm_opts(options, &fc->security);
584577
if (ret)
585578
return ret;
@@ -1581,8 +1574,6 @@ smb3_cleanup_fs_context_contents(struct smb3_fs_context *ctx)
15811574
/*
15821575
* Make sure this stays in sync with smb3_fs_context_dup()
15831576
*/
1584-
kfree(ctx->mount_options);
1585-
ctx->mount_options = NULL;
15861577
kfree(ctx->username);
15871578
ctx->username = NULL;
15881579
kfree_sensitive(ctx->password);

fs/cifs/fs_context.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,6 @@ struct smb3_fs_context {
264264
__u16 compression; /* compression algorithm 0xFFFF default 0=disabled */
265265
bool rootfs:1; /* if it's a SMB root file system */
266266
bool witness:1; /* use witness protocol */
267-
268-
char *mount_options;
269267
};
270268

271269
extern const struct fs_parameter_spec smb3_fs_parameters[];

0 commit comments

Comments
 (0)