From: Pavel Shilovsky Date: Wed, 28 Mar 2012 17:56:19 +0000 (+0400) Subject: CIFS: Fix VFS lock usage for oplocked files X-Git-Tag: v3.2.15~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d5e264758e31dd1d1e609a5a4d3d6dc693b9d2e;p=pandora-kernel.git CIFS: Fix VFS lock usage for oplocked files commit 66189be74ff5f9f3fd6444315b85be210d07cef2 upstream. We can deadlock if we have a write oplock and two processes use the same file handle. In this case the first process can't unlock its lock if the second process blocked on the lock in the same time. Fix it by using posix_lock_file rather than posix_lock_file_wait under cinode->lock_mutex. If we request a blocking lock and posix_lock_file indicates that there is another lock that prevents us, wait untill that lock is released and restart our call. Acked-by: Jeff Layton Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed