diff -u --new-file --exclude-from ../exclude --recursive linux.vanilla/fs/block_dev.c linux.15p6/fs/block_dev.c
--- linux.vanilla/fs/block_dev.c Tue Jan 4 21:19:00 2000
+++ linux.15p6/fs/block_dev.c Wed Jan 12 01:06:21 2000
@@ -92,6 +92,7 @@
blocks = read_ahead[MAJOR(dev)] / (blocksize >> 9) / 2;
if (block + blocks > size) blocks = size - block;
if (blocks > NBUF) blocks=NBUF;
+ if (!blocks) blocks = 1;
for(i=1; i<blocks; i++)
{
bhlist[i] = getblk (dev, block+i, blocksize);
@@ -105,8 +106,10 @@
ll_rw_block(READ, blocks, bhlist);
for(i=1; i<blocks; i++) brelse(bhlist[i]);
wait_on_buffer(bh);
- if (!buffer_uptodate(bh))
+ if (!buffer_uptodate(bh)) {
+ brelse(bh);
return written ? written : -EIO;
+ }
};
};
#endif