diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-06-13 15:04:13 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-06-13 15:04:13 +1000 |
commit | 7c3cc54816f8f7cca66264b98dc8ef5ad43b6c7b (patch) | |
tree | dd19d315f4004fa662c522255bfcedabb1c704fc | |
parent | 39798c1219e461e46125ebe1481dee48b9e07255 (diff) | |
parent | 534dadac99bdccc249e6c8021b89c6247dbf2255 (diff) |
Merge commit 'dlm/next'
-rw-r--r-- | fs/dlm/lock.c | 3 | ||||
-rw-r--r-- | fs/dlm/user.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 2d3d1027ce2b..7ba9586a0943 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -1782,7 +1782,8 @@ static void grant_pending_locks(struct dlm_rsb *r) list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { if (lkb->lkb_bastfn && lock_requires_bast(lkb, high, cw)) { - if (cw && high == DLM_LOCK_PR) + if (cw && high == DLM_LOCK_PR && + lkb->lkb_grmode == DLM_LOCK_PR) queue_bast(r, lkb, DLM_LOCK_CW); else queue_bast(r, lkb, high); diff --git a/fs/dlm/user.c b/fs/dlm/user.c index ebbcf38fd33b..1aa76b32d056 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -538,7 +538,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, /* do we really need this? can a write happen after a close? */ if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) && - test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags)) + (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) return -EINVAL; sigfillset(&allsigs); |