This patch increases efficiency a little bit by directly returning
NULL (identical error codes)
Oliver Neukum
---1463811840-889801541-884901329=:184
Content-Type: TEXT/plain; CHARSET=US-ASCII
Content-Description: mypatch
+++ linux/fs/buffer.c Thu Jan 15 20:25:54 1998
@@ -615,17 +615,16 @@
* Get the hard sector size for the given device. If we don't know
* what it is, return 0.
*/
+ int blksize = 0;
if (hardsect_size[MAJOR(dev)] != NULL) {
- int blksize = hardsect_size[MAJOR(dev)][MINOR(dev)];
- if (blksize != 0)
- return blksize;
+ blksize = hardsect_size[MAJOR(dev)][MINOR(dev)];
+ /* checking for NULL is not necessary, we fall thru */
}
/*
- * We don't know what the hardware sector size for this device is.
* Return 0 indicating that we don't know.
*/
- return 0;
+ return blksize;
}
void set_blocksize(kdev_t dev, int size)
---1463811840-889801541-884901329=:184--