Skip to content

Commit 0cbc300

Browse files
ddisssmfrench
authored andcommitted
smb/client: remove unused smb3_parse_opt()
Commit abdb174 ("cifs: get rid of mount options string parsing") removed the last caller. Signed-off-by: David Disseldorp <ddiss@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 254f496 commit 0cbc300

2 files changed

Lines changed: 0 additions & 32 deletions

File tree

fs/smb/client/cifsproto.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ int cifs_handle_standard(struct TCP_Server_Info *server,
8989
struct mid_q_entry *mid);
9090
char *smb3_fs_context_fullpath(const struct smb3_fs_context *ctx, char dirsep);
9191
int smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx);
92-
int smb3_parse_opt(const char *options, const char *key, char **val);
9392
int cifs_ipaddr_cmp(struct sockaddr *srcaddr, struct sockaddr *rhs);
9493
bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs);
9594
int cifs_discard_remaining_data(struct TCP_Server_Info *server);

fs/smb/client/fs_context.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -536,37 +536,6 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
536536
return 0;
537537
}
538538

539-
int smb3_parse_opt(const char *options, const char *key, char **val)
540-
{
541-
int rc = -ENOENT;
542-
char *opts, *orig, *p;
543-
544-
orig = opts = kstrdup(options, GFP_KERNEL);
545-
if (!opts)
546-
return -ENOMEM;
547-
548-
while ((p = strsep(&opts, ","))) {
549-
char *nval;
550-
551-
if (!*p)
552-
continue;
553-
if (strncasecmp(p, key, strlen(key)))
554-
continue;
555-
nval = strchr(p, '=');
556-
if (nval) {
557-
if (nval == p)
558-
continue;
559-
*nval++ = 0;
560-
*val = kstrdup(nval, GFP_KERNEL);
561-
rc = !*val ? -ENOMEM : 0;
562-
goto out;
563-
}
564-
}
565-
out:
566-
kfree(orig);
567-
return rc;
568-
}
569-
570539
/*
571540
* Remove duplicate path delimiters. Windows is supposed to do that
572541
* but there are some bugs that prevent rename from working if there are

0 commit comments

Comments
 (0)