]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
smb/client: remove unused smb3_parse_opt()
authorDavid Disseldorp <ddiss@suse.de>
Sun, 26 Apr 2026 11:39:37 +0000 (21:39 +1000)
committerSteve French <stfrench@microsoft.com>
Mon, 27 Apr 2026 01:11:40 +0000 (20:11 -0500)
Commit abdb1742a3123 ("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>
fs/smb/client/cifsproto.h
fs/smb/client/fs_context.c

index 4a25afda9448a4e089df601586180473ae9fdb5d..79d891f7df1a508978948ac7b4fe6c0a41fd6c9d 100644 (file)
@@ -89,7 +89,6 @@ int cifs_handle_standard(struct TCP_Server_Info *server,
                         struct mid_q_entry *mid);
 char *smb3_fs_context_fullpath(const struct smb3_fs_context *ctx, char dirsep);
 int smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx);
-int smb3_parse_opt(const char *options, const char *key, char **val);
 int cifs_ipaddr_cmp(struct sockaddr *srcaddr, struct sockaddr *rhs);
 bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs);
 int cifs_discard_remaining_data(struct TCP_Server_Info *server);
index b9544eb0381b73e7fda357e7476fe481a1b1a375..b63ec7ab6e5131653e135a3f0db4917ad06eb155 100644 (file)
@@ -536,37 +536,6 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
        return 0;
 }
 
-int smb3_parse_opt(const char *options, const char *key, char **val)
-{
-       int rc = -ENOENT;
-       char *opts, *orig, *p;
-
-       orig = opts = kstrdup(options, GFP_KERNEL);
-       if (!opts)
-               return -ENOMEM;
-
-       while ((p = strsep(&opts, ","))) {
-               char *nval;
-
-               if (!*p)
-                       continue;
-               if (strncasecmp(p, key, strlen(key)))
-                       continue;
-               nval = strchr(p, '=');
-               if (nval) {
-                       if (nval == p)
-                               continue;
-                       *nval++ = 0;
-                       *val = kstrdup(nval, GFP_KERNEL);
-                       rc = !*val ? -ENOMEM : 0;
-                       goto out;
-               }
-       }
-out:
-       kfree(orig);
-       return rc;
-}
-
 /*
  * Remove duplicate path delimiters. Windows is supposed to do that
  * but there are some bugs that prevent rename from working if there are