ocfs2: add missing lockres put in dlm_mig_lockres_handler
PATCH 1/1 ocfs2: add missing lockres put in dlm_mig_lockres_handler
dlm_mig_lockres_handler goes to leave, when lockres with state DLM_LOCK_RES_RECOVERING, not putting lockres taken in dlm_lookup_lockres.
Signed-off-by joyce <[email protected]>
--- fs/ocfs2/dlm/dlmrecovery.c | 1 + 1 file changed, 1 insertion(+)
fs/ocfs2/dlm/dlmrecovery.c +1 -0
@@ -1408,6 +1408,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, mres->lockname_len, mres->lockname); ret = -EFAULT ;spin_unlock (&res->spinlock); +dlm_lockres_put (res); goto leave; } res->state |=DLM_LOCK_RES_MIGRATING ;
Signature · 1 line
1.7.9.7
PATCH 1/1 ocfs2: add missing lockres put in dlm_mig_lockres_handler
Quoted 2 lines · Xue jiufei
dlm_mig_lockres_handlergoes to leave, when lockres with stateDLM_LOCK_RES_RECOVERING, not putting lockres taken indlm_lookup_lockres.
it is obvious bug. it cause memory leak.
Reviewed-by shencanquan <[email protected]>
Quoted 17 lines
Signed-off-by joyce<[email protected]>--- fs/ocfs2/dlm/dlmrecovery.c | 1 + 1 file changed, 1 insertion(+)fs/ocfs2/dlm/dlmrecovery.c +1
-0@@ -1408,6 +1408,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, mres->lockname_len, mres->lockname); ret = -EFAULT ;spin_unlock (&res->spinlock); +dlm_lockres_put (res); goto leave; } res->state |=DLM_LOCK_RES_MIGRATING ;
Joel Becker
maintainerPATCH 1/1 ocfs2: add missing lockres put in dlm_mig_lockres_handler
In reply to Xue jiufeiQuoted 4 lines · Xue jiufei
dlm_mig_lockres_handlergoes to leave, when lockres with stateDLM_LOCK_RES_RECOVERING, not putting lockres taken indlm_lookup_lockres.Signed-off-by joyce <[email protected]>
Acked-by Joel Becker <[email protected]>
Quoted 24 lines
--- fs/ocfs2/dlm/dlmrecovery.c | 1 + 1 file changed, 1 insertion(+)fs/ocfs2/dlm/dlmrecovery.c +1
-0@@ -1408,6 +1408,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, mres->lockname_len, mres->lockname); ret = -EFAULT ;spin_unlock (&res->spinlock); +dlm_lockres_put (res); goto leave; } res->state |=DLM_LOCK_RES_MIGRATING ;Signature · 7 lines
1.7.9.7 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel at oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 6 lines
Life's Little Instruction Book #314 "Never underestimate the power of forgiveness." http://www.jlbec.org/ jlbec at evilplan.org