nbd updates (against 2.3.26)

Pavel Machek (pavel@bug.ucw.cz)
Tue, 9 Nov 1999 22:12:00 +0100


--- clean/include/linux/nbd.h Wed Mar 10 22:37:38 1999
+++ linux/include/linux/nbd.h Tue Nov 9 22:07:53 1999
@@ -1,3 +1,9 @@
+/*
+ * 1999 Copyright (C) Pavel Machek, pavel@ucw.cz. This code is GPL.
+ * 1999/11/04 Copyright (C) 1999 VMware, Inc. (Regis "HPReg" Duchesne)
+ * Made nbd_end_request() use the io_request_lock
+ */
+
#ifndef LINUX_NBD_H
#define LINUX_NBD_H

@@ -27,12 +33,19 @@
static void
nbd_end_request(struct request *req)
{
+ unsigned long flags;
+
#ifdef PARANOIA
requests_out++;
#endif
+ spin_lock_irqsave(&io_request_lock, flags);
if (end_that_request_first( req, !req->errors, "nbd" ))
- return;
+ goto out;
end_that_request_last( req );
+
+out:
+ spin_unlock_irqrestore(&io_request_lock, flags);
+ return;
}

#define MAX_NBD 128
--- clean/drivers/block/nbd.c Thu Jul 22 00:40:22 1999
+++ linux/drivers/block/nbd.c Fri Oct 29 14:55:05 1999
@@ -35,6 +35,7 @@
#include <linux/errno.h>
#include <linux/file.h>
#include <linux/ioctl.h>
+#include <net/sock.h>

#include <asm/segment.h>
#include <asm/uaccess.h>
@@ -105,6 +106,7 @@


do {
+ sock->sk->allocation = GFP_ATOMIC;
iov.iov_base = buf;
iov.iov_len = size;
msg.msg_name = NULL;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/