Re: [PATCH 03/18] fs_context: fix detecting full log buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Biggers <ebiggers3@xxxxxxxxx> wrote:

> When 'head' and 'tail' wrap around, 'log->head - log->tail' will be
> something like '4 - 252 = -248', and comparing that directly to the
> array size is wrong.  Fix by casting to 'u8'.

I think a better fix is to use CIRC_CNT() or CIRC_SPACE().

David



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux