diff --git a/[refs] b/[refs] index 1f30d71f9148..15a8e7e2db37 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d88101d4d82ea09433692af30618c3b7afb7da02 +refs/heads/master: a7a2ff8a951ab373732116e7c31e2e1fe025d5e0 diff --git a/trunk/fs/gfs2/locking/dlm/plock.c b/trunk/fs/gfs2/locking/dlm/plock.c index 1dc76805dd45..fba1f1d87e4f 100644 --- a/trunk/fs/gfs2/locking/dlm/plock.c +++ b/trunk/fs/gfs2/locking/dlm/plock.c @@ -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);