projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
927cfc9
)
gfs2: Get rid of unnecessary test_and_set_bit
author
Andreas Gruenbacher
<agruenba@redhat.com>
Fri, 29 Mar 2024 14:46:32 +0000
(15:46 +0100)
committer
Andreas Gruenbacher
<agruenba@redhat.com>
Tue, 9 Apr 2024 16:35:58 +0000
(18:35 +0200)
The GLF_LOCK flag is protected by the gl->gl_lockref.lock spin lock
which is held when entering run_queue(), so we can use test_bit() and
set_bit() here.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/gfs2/glock.c
b/fs/gfs2/glock.c
index a700e424f790363268a30315b285b9d3da0b3dd4..fa047331ea3c52c7ba4518d32c0aa9bf249cfc60 100644
(file)
--- a/
fs/gfs2/glock.c
+++ b/
fs/gfs2/glock.c
@@
-842,8
+842,9
@@
__acquires(&gl->gl_lockref.lock)
{
struct gfs2_holder *gh = NULL;
- if (test_
and_set_
bit(GLF_LOCK, &gl->gl_flags))
+ if (test_bit(GLF_LOCK, &gl->gl_flags))
return;
+ set_bit(GLF_LOCK, &gl->gl_flags);
GLOCK_BUG_ON(gl, test_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags));