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:
b2798bf
)
[PATCH] ocfs2/dlm: Fixes oops in dlm_new_lockres()
author
Sunil Mushran
<
[email protected]
>
Mon, 7 Jul 2008 17:06:29 +0000
(10:06 -0700)
committer
Mark Fasheh
<
[email protected]
>
Mon, 7 Jul 2008 18:24:29 +0000
(11:24 -0700)
Patch fixes a race that can result in an oops while adding a
lockres to the dlm lockres tracking list.
Bug introduced by mainline commit
29576f8bb54045be944ba809d4fca1ad77c94165
.
Signed-off-by: Sunil Mushran <
[email protected]
>
Signed-off-by: Mark Fasheh <
[email protected]
>
fs/ocfs2/dlm/dlmmaster.c
patch
|
blob
|
history
diff --git
a/fs/ocfs2/dlm/dlmmaster.c
b/fs/ocfs2/dlm/dlmmaster.c
index efc015c6128aecc9aae54772dbf71c9a88b39211..44f87caf36834fda999768a06448953afcaa6ef4 100644
(file)
--- a/
fs/ocfs2/dlm/dlmmaster.c
+++ b/
fs/ocfs2/dlm/dlmmaster.c
@@
-606,7
+606,9
@@
static void dlm_init_lockres(struct dlm_ctxt *dlm,
res->last_used = 0;
+ spin_lock(&dlm->spinlock);
list_add_tail(&res->tracking, &dlm->tracking_list);
+ spin_unlock(&dlm->spinlock);
memset(res->lvb, 0, DLM_LVB_LEN);
memset(res->refmap, 0, sizeof(res->refmap));