projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57c7310
)
GFS2: use memchr_inv
author
Akinobu Mita
<
[email protected]
>
Thu, 7 Mar 2013 14:42:52 +0000
(23:42 +0900)
committer
Steven Whitehouse
<
[email protected]
>
Thu, 4 Apr 2013 08:52:50 +0000
(09:52 +0100)
Use memchr_inv to verify that the specified memory range is cleared.
Signed-off-by: Akinobu Mita <
[email protected]
>
Cc: Steven Whitehouse <
[email protected]
>
Cc:
[email protected]
Cc: Christine Caulfield <
[email protected]
>
Cc: David Teigland <
[email protected]
>
fs/gfs2/lock_dlm.c
patch
|
blob
|
history
diff --git
a/fs/gfs2/lock_dlm.c
b/fs/gfs2/lock_dlm.c
index b15bb45911ca84e1e3ef1dc7d03ad0f27d3f49d8..c8423d6de6c3ee54341d5ea5c4eb7e20ca7255de 100644
(file)
--- a/
fs/gfs2/lock_dlm.c
+++ b/
fs/gfs2/lock_dlm.c
@@
-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)
{
- int i;
- for (i = JID_BITMAP_OFFSET; i < GDLM_LVB_SIZE; i++) {
- if (lvb[i])
- return 0;
- }
- return 1;
+ return !memchr_inv(lvb + JID_BITMAP_OFFSET, 0,
+ GDLM_LVB_SIZE - JID_BITMAP_OFFSET);
}
static void sync_wait_cb(void *arg)