Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76043
b: refs/heads/master
c: 2066b58
h: refs/heads/master
i:
  76041: f0d4b7c
  76039: 573fac8
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Jan 25, 2008
1 parent 95b7757 commit 5570517
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbee2199c37336e89060fbe9abdfd1ca8454372a
refs/heads/master: 2066b58b0a038d7aedd24133677efb8856cac3a1
18 changes: 14 additions & 4 deletions trunk/fs/gfs2/locking/dlm/plock.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,19 @@ int gdlm_plock(void *lockspace, struct lm_lockname *name,
op->info.number = name->ln_number;
op->info.start = fl->fl_start;
op->info.end = fl->fl_end;
op->info.owner = (__u64)(long) fl->fl_owner;
if (fl->fl_lmops && fl->fl_lmops->fl_grant) {
/* fl_owner is lockd which doesn't distinguish
processes on the nfs client */
op->info.owner = (__u64) fl->fl_pid;
xop->callback = fl->fl_lmops->fl_grant;
locks_init_lock(&xop->flc);
locks_copy_lock(&xop->flc, fl);
xop->fl = fl;
xop->file = file;
} else
} else {
op->info.owner = (__u64)(long) fl->fl_owner;
xop->callback = NULL;
}

send_op(op);

Expand Down Expand Up @@ -203,7 +207,10 @@ int gdlm_punlock(void *lockspace, struct lm_lockname *name,
op->info.number = name->ln_number;
op->info.start = fl->fl_start;
op->info.end = fl->fl_end;
op->info.owner = (__u64)(long) fl->fl_owner;
if (fl->fl_lmops && fl->fl_lmops->fl_grant)
op->info.owner = (__u64) fl->fl_pid;
else
op->info.owner = (__u64)(long) fl->fl_owner;

send_op(op);
wait_event(recv_wq, (op->done != 0));
Expand Down Expand Up @@ -242,7 +249,10 @@ int gdlm_plock_get(void *lockspace, struct lm_lockname *name,
op->info.number = name->ln_number;
op->info.start = fl->fl_start;
op->info.end = fl->fl_end;
op->info.owner = (__u64)(long) fl->fl_owner;
if (fl->fl_lmops && fl->fl_lmops->fl_grant)
op->info.owner = (__u64) fl->fl_pid;
else
op->info.owner = (__u64)(long) fl->fl_owner;

send_op(op);
wait_event(recv_wq, (op->done != 0));
Expand Down

0 comments on commit 5570517

Please sign in to comment.