Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58575
b: refs/heads/master
c: a7a2ff8
h: refs/heads/master
i:
  58573: 99fdd86
  58571: 6e4d020
  58567: 5fc590a
  58559: 89c71c7
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Jul 9, 2007
1 parent b050991 commit 2cb5c04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: d88101d4d82ea09433692af30618c3b7afb7da02
refs/heads/master: a7a2ff8a951ab373732116e7c31e2e1fe025d5e0
6 changes: 5 additions & 1 deletion trunk/fs/gfs2/locking/dlm/plock.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,20 @@ int gdlm_plock_get(void *lockspace, struct lm_lockname *name,
}
spin_unlock(&ops_lock);

/* info.rv from userspace is 1 for conflict, 0 for no-conflict,
-ENOENT if there are no locks on the file */

rv = op->info.rv;

fl->fl_type = F_UNLCK;
if (rv == -ENOENT)
rv = 0;
else if (rv == 0 && op->info.pid != fl->fl_pid) {
else if (rv > 0) {
fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK;
fl->fl_pid = op->info.pid;
fl->fl_start = op->info.start;
fl->fl_end = op->info.end;
rv = 0;
}

kfree(op);
Expand Down

0 comments on commit 2cb5c04

Please sign in to comment.