1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-09-08 13:44:19 +03:00

o stray return -ENXIO in reuqest [Jens Axboe]

This commit is contained in:
Joe Thornber
2001-08-31 09:43:35 +00:00
parent 902d4c31fb
commit 1f0520634f

View File

@@ -346,7 +346,7 @@ static int request(request_queue_t *q, int rw, struct buffer_head *bh)
int r, minor = MINOR(bh->b_rdev); int r, minor = MINOR(bh->b_rdev);
if (minor >= MAX_DEVICES) if (minor >= MAX_DEVICES)
return -ENXIO; goto bad_no_lock;
rl; rl;
md = _devs[minor]; md = _devs[minor];
@@ -359,11 +359,10 @@ static int request(request_queue_t *q, int rw, struct buffer_head *bh)
ru; ru;
r = queue_io(md, bh, rw); r = queue_io(md, bh, rw);
if (r < 0) { if (r < 0)
buffer_IO_error(bh); goto bad_no_lock;
return 0;
} else if (r > 0) else if (r > 0)
return 0; /* deferred successfully */ return 0; /* deferred successfully */
rl; /* FIXME: there's still a race here */ rl; /* FIXME: there's still a race here */
@@ -377,6 +376,8 @@ static int request(request_queue_t *q, int rw, struct buffer_head *bh)
bad: bad:
ru; ru;
bad_no_lock:
buffer_IO_error(bh); buffer_IO_error(bh);
return 0; return 0;
} }