Re: buffer_head.b_bsize type
From: Stewart Smith (stewartsmith@mac.com)
Date: Thu May 29 2003 - 09:22:17 EST
On Thursday, May 29, 2003, at 09:15 PM,
viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
Could we go the other way and make all users of b_size use unsigned?
Who the hell cares? Size of buffer does not exceed the page size.
Unless you can show a platform with 2Gb pages...
I would argue the same that the size of a buffer should never be able
to be negative and the structure says this but the rest of the code
does not. (Theoretically) if a negative size was asked for, then we'd
actually try to allocate a large amount of memory for the buffer,
possibly causing badness somewhere along the line.
Any maybe we shouldn't make it too hard for archs with 2GB pages :)
It'll probably happen in 20 years. :)
------------------------------
Stewart Smith
stewartsmith@xxxxxxx
Ph: +61 4 3884 4332
ICQ: 6734154
http://www.flamingspork.com/ http://www.linux.org.au
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/