git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
GFS2: Fix panic in glock memory shrinker
[pandora-kernel.git]
/
fs
/
gfs2
/
glock.c
diff --git
a/fs/gfs2/glock.c
b/fs/gfs2/glock.c
index
fdb796c
..
827136e
100644
(file)
--- a/
fs/gfs2/glock.c
+++ b/
fs/gfs2/glock.c
@@
-1314,6
+1314,10
@@
static int gfs2_shrink_glock_memory(int nr, gfp_t gfp_mask)
list_del_init(&gl->gl_lru);
atomic_dec(&lru_count);
+ /* Check if glock is about to be freed */
+ if (atomic_read(&gl->gl_ref) == 0)
+ continue;
+
/* Test for being demotable */
if (!test_and_set_bit(GLF_LOCK, &gl->gl_flags)) {
gfs2_glock_hold(gl);