Commit 15746fca authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds
Browse files

nbd: trivial cleanups



Trivial cleanups for nbd: only the return -EIO one really changes code,
and I've verified all the callers (plus 0 == success, 1 == error
convention is really ugly).

Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
Acked-by: default avatarPaul Clements <paul.clements@steeleye.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1a2ad211
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 * Note that you can not swap over this thing, yet. Seems to work but
 * deadlocks sometimes - you can not swap over TCP in general.
 * 
 * Copyright 1997-2000 Pavel Machek <pavel@ucw.cz>
 * Copyright 1997-2000, 2008 Pavel Machek <pavel@suse.cz>
 * Parts copyright 2001 Steven Whitehouse <steve@chygwyn.com>
 *
 * This file is released under GPLv2 or later.
@@ -276,7 +276,7 @@ static int nbd_send_req(struct nbd_device *lo, struct request *req)
	return 0;

error_out:
	return 1;
	return -EIO;
}

static struct request *nbd_find_request(struct nbd_device *lo,
@@ -467,9 +467,7 @@ static void nbd_handle_req(struct nbd_device *lo, struct request *req)
		mutex_unlock(&lo->tx_lock);
		printk(KERN_ERR "%s: Attempted send on closed socket\n",
		       lo->disk->disk_name);
		req->errors++;
		nbd_end_request(req);
		return;
		goto error_out;
	}

	lo->active_req = req;