GFS2: use memchr_inv
Use memchr_inv to verify that the specified memory range is cleared. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: cluster-devel@redhat.com Cc: Christine Caulfield <ccaulfie@redhat.com> Cc: David Teigland <teigland@redhat.com>
This commit is contained in:
committed by
Steven Whitehouse
parent
57c7310b8e
commit
4146c3d469
@@ -483,12 +483,8 @@ static void control_lvb_write(struct lm_lockstruct *ls, uint32_t lvb_gen,
|
|||||||
|
|
||||||
static int all_jid_bits_clear(char *lvb)
|
static int all_jid_bits_clear(char *lvb)
|
||||||
{
|
{
|
||||||
int i;
|
return !memchr_inv(lvb + JID_BITMAP_OFFSET, 0,
|
||||||
for (i = JID_BITMAP_OFFSET; i < GDLM_LVB_SIZE; i++) {
|
GDLM_LVB_SIZE - JID_BITMAP_OFFSET);
|
||||||
if (lvb[i])
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sync_wait_cb(void *arg)
|
static void sync_wait_cb(void *arg)
|
||||||
|
Reference in New Issue
Block a user