Messages in this thread |  | | | Date | Thu, 29 May 2003 03:35:03 -0700 | | From | William Lee Irwin III <> | | Subject | Re: buffer_head.b_bsize type |
| |
On Thu, May 29, 2003 at 08:29:40PM +1000, Stewart Smith wrote: > The buffer_head structure (include/linux/buffer_head.h) uses a u32 type > while everywhere else (e.g. bread) the size parameter is of type int. > Currently on all architectures u32 is defined as unsigned int. We > should probably not be doing unsigned and signed swaps. And you should > never really have a negative size of a buffer. > So, there are two solutions: either change the buffer_head struct to be > int so it matches everywhere else, or change everywhere else. > The attached patch does the change in one place. Although perhaps > changing everywhere else would be better. Thoughts? I'm happy to make > up the patch if needed. > Applies cleanly to 2.5.69 and 2.5.70 and has been tested on i386 > without causing any further problems (that I can see at least).
Could we go the other way and make all users of b_size use unsigned?
Thanks.
-- wli - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |