I *think* this is OK. I'm wary of us clearing state of a broken lock, but I think other holders on this node won't get any farther. Essentially, I'm worried that we have some state on this node that other nodes won't see if we let them get unwedged. But if we are changing things, we already have an EX, so they are just as wedged.
Plus, you already merged it. Acked-by: Joel Becker <[email protected]> On Thu, Feb 21, 2013 at 04:42:45PM -0800, [email protected] wrote: > From: Junxiao Bi <[email protected]> > Subject: ocfs2: unlock super lock if lockres refresh failed > > If lockres refresh failed, the super lock will never be released which > will cause some processes on other cluster nodes hung forever. > > Signed-off-by: Junxiao Bi <[email protected]> > Cc: Joel Becker <[email protected]> > Cc: Mark Fasheh <[email protected]> > Cc: <[email protected]> > Signed-off-by: Andrew Morton <[email protected]> > --- > > fs/ocfs2/dlmglue.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff -puN > fs/ocfs2/dlmglue.c~ocfs2-unlock-super-lock-if-lockres-refresh-failed > fs/ocfs2/dlmglue.c > --- a/fs/ocfs2/dlmglue.c~ocfs2-unlock-super-lock-if-lockres-refresh-failed > +++ a/fs/ocfs2/dlmglue.c > @@ -2545,6 +2545,7 @@ int ocfs2_super_lock(struct ocfs2_super > * everything is up to the caller :) */ > status = ocfs2_should_refresh_lock_res(lockres); > if (status < 0) { > + ocfs2_cluster_unlock(osb, lockres, level); > mlog_errno(status); > goto bail; > } > @@ -2553,8 +2554,10 @@ int ocfs2_super_lock(struct ocfs2_super > > ocfs2_complete_lock_res_refresh(lockres, status); > > - if (status < 0) > + if (status < 0) { > + ocfs2_cluster_unlock(osb, lockres, level); > mlog_errno(status); > + } > ocfs2_track_lock_refresh(lockres); > } > bail: > _ -- "I'm living so far beyond my income that we may almost be said to be living apart." - e e cummings http://www.jlbec.org/ [email protected] -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
