]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: David Teigland <teigland@redhat.com> |
2 | commit 03339696314fffb95dafb349b84243358e945ce6 | |
3 | Author: David Teigland <teigland@redhat.com> | |
4 | Date: Mon Dec 8 17:14:10 2008 -0600 | |
5 | Subject: dlm: remove extra blocking callback check | |
6 | ||
7 | Just before delivering a blocking callback (bast), the dlm_astd | |
8 | thread checks again that the granted mode of the lkb actually | |
9 | blocks the mode requested by the bast. The idea behind this was | |
10 | originally that the granted mode may have changed since the bast | |
11 | was queued, making the callback now unnecessary. Reasons for | |
12 | removing this extra check are: | |
13 | - dlm_astd doesn't lock the rsb before reading the lkb grmode, so | |
14 | it's not technically safe (this removes the long standing FIXME) | |
15 | - after running some tests, it doesn't appear the check ever actually | |
16 | eliminates a bast | |
17 | - delivering an unnecessary blocking callback isn't a bad thing and | |
18 | can happen anyway | |
19 | ||
20 | Signed-off-by: David Teigland <teigland@redhat.com> | |
21 | Signed-off-by: Coly Li <coly.li@suse.de> | |
22 | ||
23 | diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c | |
24 | index 30c11f3..09b167d 100644 | |
25 | --- a/fs/dlm/ast.c | |
26 | +++ b/fs/dlm/ast.c | |
27 | @@ -89,13 +89,8 @@ static void process_asts(void) | |
28 | if ((type & AST_COMP) && cast) | |
29 | cast(lkb->lkb_astparam); | |
30 | ||
31 | - /* FIXME: Is it safe to look at lkb_grmode here | |
32 | - without doing a lock_rsb() ? | |
33 | - Look at other checks in v1 to avoid basts. */ | |
34 | - | |
35 | if ((type & AST_BAST) && bast) | |
36 | - if (!dlm_modes_compat(lkb->lkb_grmode, bmode)) | |
37 | - bast(lkb->lkb_astparam, bmode); | |
38 | + bast(lkb->lkb_astparam, bmode); | |
39 | ||
40 | /* this removes the reference added by dlm_add_ast | |
41 | and may result in the lkb being freed */ |