[GFS2] match plock result with correct request
authorDavid Teigland <teigland@redhat.com>
Fri, 4 Aug 2006 21:19:20 +0000 (16:19 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 7 Aug 2006 12:46:51 +0000 (08:46 -0400)
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>
fs/gfs2/locking/dlm/plock.c

index e5b11f0688f6dbc8e390f8dfee84819405c8119d..1acb2519f4391df31778707f91ffa47e60ee3493 100644 (file)
@@ -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;
This page took 0.026074 seconds and 5 git commands to generate.