]> Git Repo - linux.git/blobdiff - fs/cifs/smbdirect.c
Merge tag 'pci-v4.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[linux.git] / fs / cifs / smbdirect.c
index 5130492847eb15389757b550346ee6608ee76d9a..91710eb571fb3a61a1fe601d2eb72b0e7b15cc8a 100644 (file)
@@ -217,9 +217,10 @@ static void smbd_destroy_rdma_work(struct work_struct *work)
                        spin_unlock_irqrestore(
                                &info->reassembly_queue_lock, flags);
                        put_receive_buffer(info, response);
-               }
+               } else
+                       spin_unlock_irqrestore(&info->reassembly_queue_lock, flags);
        } while (response);
-       spin_unlock_irqrestore(&info->reassembly_queue_lock, flags);
+
        info->reassembly_data_length = 0;
 
        log_rdma_event(INFO, "free receive buffers\n");
@@ -1934,15 +1935,16 @@ again:
                                 * No need to lock if we are not at the
                                 * end of the queue
                                 */
-                               if (!queue_length)
+                               if (queue_length)
+                                       list_del(&response->list);
+                               else {
                                        spin_lock_irq(
                                                &info->reassembly_queue_lock);
-                               list_del(&response->list);
-                               queue_removed++;
-                               if (!queue_length)
+                                       list_del(&response->list);
                                        spin_unlock_irq(
                                                &info->reassembly_queue_lock);
-
+                               }
+                               queue_removed++;
                                info->count_reassembly_queue--;
                                info->count_dequeue_reassembly_queue++;
                                put_receive_buffer(info, response);
This page took 0.031519 seconds and 4 git commands to generate.