소스 검색

[GFS2] match plock result with correct request

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>
David Teigland 19 년 전
부모
커밋
08eac93a68
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      fs/gfs2/locking/dlm/plock.c

+ 2 - 1
fs/gfs2/locking/dlm/plock.c

@@ -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;