Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9de151b authored by Steve French's avatar Steve French
Browse files

address lock imbalance warnings in smbdirect.c



Although at least one of these was an overly strict sparse warning
in the new smbdirect code, it is cleaner to fix - so no warnings.

Signed-off-by: default avatarSteve French <smfrench@gmail.com>
Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
parent ade7db99
Loading
Loading
Loading
Loading
+9 −7
Original line number Original line Diff line number Diff line
@@ -217,9 +217,10 @@ static void smbd_destroy_rdma_work(struct work_struct *work)
			spin_unlock_irqrestore(
			spin_unlock_irqrestore(
				&info->reassembly_queue_lock, flags);
				&info->reassembly_queue_lock, flags);
			put_receive_buffer(info, response);
			put_receive_buffer(info, response);
		}
		} else
	} while (response);
			spin_unlock_irqrestore(&info->reassembly_queue_lock, flags);
			spin_unlock_irqrestore(&info->reassembly_queue_lock, flags);
	} while (response);

	info->reassembly_data_length = 0;
	info->reassembly_data_length = 0;


	log_rdma_event(INFO, "free receive buffers\n");
	log_rdma_event(INFO, "free receive buffers\n");
@@ -1934,15 +1935,16 @@ static int smbd_recv_buf(struct smbd_connection *info, char *buf,
				 * No need to lock if we are not at the
				 * No need to lock if we are not at the
				 * end of the queue
				 * end of the queue
				 */
				 */
				if (!queue_length)
				if (queue_length)
					list_del(&response->list);
				else {
					spin_lock_irq(
					spin_lock_irq(
						&info->reassembly_queue_lock);
						&info->reassembly_queue_lock);
					list_del(&response->list);
					list_del(&response->list);
				queue_removed++;
				if (!queue_length)
					spin_unlock_irq(
					spin_unlock_irq(
						&info->reassembly_queue_lock);
						&info->reassembly_queue_lock);

				}
				queue_removed++;
				info->count_reassembly_queue--;
				info->count_reassembly_queue--;
				info->count_dequeue_reassembly_queue++;
				info->count_dequeue_reassembly_queue++;
				put_receive_buffer(info, response);
				put_receive_buffer(info, response);