]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/rds/connection.c
Merge tag 'mvebu-dt64-4.12-3' of git://git.infradead.org/linux-mvebu into fixes
[mirror_ubuntu-artful-kernel.git] / net / rds / connection.c
index 1fa75ab7b733230585666abcb7279ba691365256..6a5ebdea7d2e9eb3b624a01a8a87ef601e3b2f13 100644 (file)
@@ -333,11 +333,19 @@ void rds_conn_shutdown(struct rds_conn_path *cp)
                rds_conn_path_reset(cp);
 
                if (!rds_conn_path_transition(cp, RDS_CONN_DISCONNECTING,
+                                             RDS_CONN_DOWN) &&
+                   !rds_conn_path_transition(cp, RDS_CONN_ERROR,
                                              RDS_CONN_DOWN)) {
                        /* This can happen - eg when we're in the middle of tearing
                         * down the connection, and someone unloads the rds module.
-                        * Quite reproduceable with loopback connections.
+                        * Quite reproducible with loopback connections.
                         * Mostly harmless.
+                        *
+                        * Note that this also happens with rds-tcp because
+                        * we could have triggered rds_conn_path_drop in irq
+                        * mode from rds_tcp_state change on the receipt of
+                        * a FIN, thus we need to recheck for RDS_CONN_ERROR
+                        * here.
                         */
                        rds_conn_path_error(cp, "%s: failed to transition "
                                            "to state DOWN, current state "