Merge tag 'asm-generic-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd...
[platform/kernel/linux-starfive.git] / fs / smb / client / cifsglob.h
index 586a0cd..b5808fe 100644 (file)
@@ -736,23 +736,20 @@ struct TCP_Server_Info {
 #endif
        struct mutex refpath_lock; /* protects leaf_fullpath */
        /*
-        * origin_fullpath: Canonical copy of smb3_fs_context::source.
-        *                  It is used for matching existing DFS tcons.
-        *
         * leaf_fullpath: Canonical DFS referral path related to this
         *                connection.
         *                It is used in DFS cache refresher, reconnect and may
         *                change due to nested DFS links.
         *
-        * Both protected by @refpath_lock and @srv_lock.  The @refpath_lock is
-        * mosly used for not requiring a copy of @leaf_fullpath when getting
+        * Protected by @refpath_lock and @srv_lock.  The @refpath_lock is
+        * mostly used for not requiring a copy of @leaf_fullpath when getting
         * cached or new DFS referrals (which might also sleep during I/O).
         * While @srv_lock is held for making string and NULL comparions against
         * both fields as in mount(2) and cache refresh.
         *
         * format: \\HOST\SHARE[\OPTIONAL PATH]
         */
-       char *origin_fullpath, *leaf_fullpath;
+       char *leaf_fullpath;
 };
 
 static inline bool is_smb1(struct TCP_Server_Info *server)
@@ -970,43 +967,6 @@ release_iface(struct kref *ref)
        kfree(iface);
 }
 
-/*
- * compare two interfaces a and b
- * return 0 if everything matches.
- * return 1 if a has higher link speed, or rdma capable, or rss capable
- * return -1 otherwise.
- */
-static inline int
-iface_cmp(struct cifs_server_iface *a, struct cifs_server_iface *b)
-{
-       int cmp_ret = 0;
-
-       WARN_ON(!a || !b);
-       if (a->speed == b->speed) {
-               if (a->rdma_capable == b->rdma_capable) {
-                       if (a->rss_capable == b->rss_capable) {
-                               cmp_ret = memcmp(&a->sockaddr, &b->sockaddr,
-                                                sizeof(a->sockaddr));
-                               if (!cmp_ret)
-                                       return 0;
-                               else if (cmp_ret > 0)
-                                       return 1;
-                               else
-                                       return -1;
-                       } else if (a->rss_capable > b->rss_capable)
-                               return 1;
-                       else
-                               return -1;
-               } else if (a->rdma_capable > b->rdma_capable)
-                       return 1;
-               else
-                       return -1;
-       } else if (a->speed > b->speed)
-               return 1;
-       else
-               return -1;
-}
-
 struct cifs_chan {
        unsigned int in_reconnect : 1; /* if session setup in progress for this channel */
        struct TCP_Server_Info *server;
@@ -1242,6 +1202,7 @@ struct cifs_tcon {
        struct delayed_work dfs_cache_work;
 #endif
        struct delayed_work     query_interfaces; /* query interfaces workqueue job */
+       char *origin_fullpath; /* canonical copy of smb3_fs_context::source */
 };
 
 /*