Skip to content

Commit

Permalink
[GFS2] match plock result with correct request
Browse files Browse the repository at this point in the history
When the result of a posix lock request is read it needs to be matched up
with the correct waiting request.  The owner field needs to be used in the
comparison since more than one process may be waiting for locks on the
same file.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Aug 7, 2006
1 parent 3120ec5 commit 08eac93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/gfs2/locking/dlm/plock.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
spin_lock(&ops_lock);
list_for_each_entry(op, &recv_list, list) {
if (op->info.fsid == info.fsid &&
op->info.number == info.number) {
op->info.number == info.number &&
op->info.owner == info.owner) {
list_del_init(&op->list);
found = 1;
op->done = 1;
Expand Down

0 comments on commit 08eac93

Please sign in to comment.