Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2cd98885
Commit
2cd98885
authored
Mar 29, 2006
by
Mark Fasheh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocfs2: test and set teardown flag early in user_dlm_destroy_lock()
Signed-off-by:
Mark Fasheh
<
mark.fasheh@oracle.com
>
parent
f43e6918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
fs/ocfs2/dlm/userdlm.c
fs/ocfs2/dlm/userdlm.c
+14
-3
No files found.
fs/ocfs2/dlm/userdlm.c
View file @
2cd98885
...
@@ -237,9 +237,13 @@ static void user_unlock_ast(void *opaque, enum dlm_status status)
...
@@ -237,9 +237,13 @@ static void user_unlock_ast(void *opaque, enum dlm_status status)
mlog
(
ML_ERROR
,
"Dlm returns status %d
\n
"
,
status
);
mlog
(
ML_ERROR
,
"Dlm returns status %d
\n
"
,
status
);
spin_lock
(
&
lockres
->
l_lock
);
spin_lock
(
&
lockres
->
l_lock
);
if
(
lockres
->
l_flags
&
USER_LOCK_IN_TEARDOWN
)
/* The teardown flag gets set early during the unlock process,
* so test the cancel flag to make sure that this ast isn't
* for a concurrent cancel. */
if
(
lockres
->
l_flags
&
USER_LOCK_IN_TEARDOWN
&&
!
(
lockres
->
l_flags
&
USER_LOCK_IN_CANCEL
))
{
lockres
->
l_level
=
LKM_IVMODE
;
lockres
->
l_level
=
LKM_IVMODE
;
else
if
(
status
==
DLM_CANCELGRANT
)
{
}
else
if
(
status
==
DLM_CANCELGRANT
)
{
mlog
(
0
,
"Lock %s, cancel fails, flags 0x%x
\n
"
,
mlog
(
0
,
"Lock %s, cancel fails, flags 0x%x
\n
"
,
lockres
->
l_name
,
lockres
->
l_flags
);
lockres
->
l_name
,
lockres
->
l_flags
);
/* We tried to cancel a convert request, but it was
/* We tried to cancel a convert request, but it was
...
@@ -608,6 +612,14 @@ int user_dlm_destroy_lock(struct user_lock_res *lockres)
...
@@ -608,6 +612,14 @@ int user_dlm_destroy_lock(struct user_lock_res *lockres)
mlog
(
0
,
"asked to destroy %s
\n
"
,
lockres
->
l_name
);
mlog
(
0
,
"asked to destroy %s
\n
"
,
lockres
->
l_name
);
spin_lock
(
&
lockres
->
l_lock
);
spin_lock
(
&
lockres
->
l_lock
);
if
(
lockres
->
l_flags
&
USER_LOCK_IN_TEARDOWN
)
{
mlog
(
0
,
"Lock is already torn down
\n
"
);
spin_unlock
(
&
lockres
->
l_lock
);
return
0
;
}
lockres
->
l_flags
|=
USER_LOCK_IN_TEARDOWN
;
while
(
lockres
->
l_flags
&
USER_LOCK_BUSY
)
{
while
(
lockres
->
l_flags
&
USER_LOCK_BUSY
)
{
spin_unlock
(
&
lockres
->
l_lock
);
spin_unlock
(
&
lockres
->
l_lock
);
...
@@ -633,7 +645,6 @@ int user_dlm_destroy_lock(struct user_lock_res *lockres)
...
@@ -633,7 +645,6 @@ int user_dlm_destroy_lock(struct user_lock_res *lockres)
lockres
->
l_flags
&=
~
USER_LOCK_ATTACHED
;
lockres
->
l_flags
&=
~
USER_LOCK_ATTACHED
;
lockres
->
l_flags
|=
USER_LOCK_BUSY
;
lockres
->
l_flags
|=
USER_LOCK_BUSY
;
lockres
->
l_flags
|=
USER_LOCK_IN_TEARDOWN
;
spin_unlock
(
&
lockres
->
l_lock
);
spin_unlock
(
&
lockres
->
l_lock
);
mlog
(
0
,
"unlocking lockres %s
\n
"
,
lockres
->
l_name
);
mlog
(
0
,
"unlocking lockres %s
\n
"
,
lockres
->
l_name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment