On 10/02/2012 11:32 AM, Christoph Hellwig wrote:
> On Tue, Oct 02, 2012 at 10:28:24AM -0500, Alex Elder wrote:
>> A pgoff_t is defined (by default) to have type (unsigned long).  On
>> architectures such as i686 that's a 32-bit type.  The ceph address
>> space code was attempting to produce 64 bit offsets by shifting a
>> page's index by PAGE_CACHE_SHIFT, but the result was not what was
>> desired because the shift occurred before the result got promoted
>> to 64 bits.
>>
>> Fix this by casting all uses of page->index used in this way to
>> the desired 64-bit type.
> 
> It would be cleaner if you'd use the page_offset helper, which was
> added to fix this problem without having to remember the right casts
> everywhere.

Will do.  Thanks Christoph.

                                        -Alex
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to