|
@@ -2,7 +2,7 @@
|
|
*******************************************************************************
|
|
*******************************************************************************
|
|
**
|
|
**
|
|
** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
|
|
** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
|
|
-** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
|
|
|
|
|
|
+** Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
|
|
**
|
|
**
|
|
** This copyrighted material is made available to anyone wishing to use,
|
|
** This copyrighted material is made available to anyone wishing to use,
|
|
** modify, copy, or redistribute it subject to the terms and conditions
|
|
** modify, copy, or redistribute it subject to the terms and conditions
|
|
@@ -33,10 +33,10 @@ void dlm_del_ast(struct dlm_lkb *lkb)
|
|
spin_unlock(&ast_queue_lock);
|
|
spin_unlock(&ast_queue_lock);
|
|
}
|
|
}
|
|
|
|
|
|
-void dlm_add_ast(struct dlm_lkb *lkb, int type)
|
|
|
|
|
|
+void dlm_add_ast(struct dlm_lkb *lkb, int type, int bastmode)
|
|
{
|
|
{
|
|
if (lkb->lkb_flags & DLM_IFL_USER) {
|
|
if (lkb->lkb_flags & DLM_IFL_USER) {
|
|
- dlm_user_add_ast(lkb, type);
|
|
|
|
|
|
+ dlm_user_add_ast(lkb, type, bastmode);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -46,6 +46,8 @@ void dlm_add_ast(struct dlm_lkb *lkb, int type)
|
|
list_add_tail(&lkb->lkb_astqueue, &ast_queue);
|
|
list_add_tail(&lkb->lkb_astqueue, &ast_queue);
|
|
}
|
|
}
|
|
lkb->lkb_ast_type |= type;
|
|
lkb->lkb_ast_type |= type;
|
|
|
|
+ if (bastmode)
|
|
|
|
+ lkb->lkb_bastmode = bastmode;
|
|
spin_unlock(&ast_queue_lock);
|
|
spin_unlock(&ast_queue_lock);
|
|
|
|
|
|
set_bit(WAKE_ASTS, &astd_wakeflags);
|
|
set_bit(WAKE_ASTS, &astd_wakeflags);
|
|
@@ -59,7 +61,7 @@ static void process_asts(void)
|
|
struct dlm_lkb *lkb;
|
|
struct dlm_lkb *lkb;
|
|
void (*cast) (void *astparam);
|
|
void (*cast) (void *astparam);
|
|
void (*bast) (void *astparam, int mode);
|
|
void (*bast) (void *astparam, int mode);
|
|
- int type = 0, found, bmode;
|
|
|
|
|
|
+ int type = 0, found, bastmode;
|
|
|
|
|
|
for (;;) {
|
|
for (;;) {
|
|
found = 0;
|
|
found = 0;
|
|
@@ -74,6 +76,7 @@ static void process_asts(void)
|
|
list_del(&lkb->lkb_astqueue);
|
|
list_del(&lkb->lkb_astqueue);
|
|
type = lkb->lkb_ast_type;
|
|
type = lkb->lkb_ast_type;
|
|
lkb->lkb_ast_type = 0;
|
|
lkb->lkb_ast_type = 0;
|
|
|
|
+ bastmode = lkb->lkb_bastmode;
|
|
found = 1;
|
|
found = 1;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -84,13 +87,12 @@ static void process_asts(void)
|
|
|
|
|
|
cast = lkb->lkb_astfn;
|
|
cast = lkb->lkb_astfn;
|
|
bast = lkb->lkb_bastfn;
|
|
bast = lkb->lkb_bastfn;
|
|
- bmode = lkb->lkb_bastmode;
|
|
|
|
|
|
|
|
if ((type & AST_COMP) && cast)
|
|
if ((type & AST_COMP) && cast)
|
|
cast(lkb->lkb_astparam);
|
|
cast(lkb->lkb_astparam);
|
|
|
|
|
|
if ((type & AST_BAST) && bast)
|
|
if ((type & AST_BAST) && bast)
|
|
- bast(lkb->lkb_astparam, bmode);
|
|
|
|
|
|
+ bast(lkb->lkb_astparam, bastmode);
|
|
|
|
|
|
/* this removes the reference added by dlm_add_ast
|
|
/* this removes the reference added by dlm_add_ast
|
|
and may result in the lkb being freed */
|
|
and may result in the lkb being freed */
|