diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-03-28 21:56:19 +0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-04-01 13:54:27 -0500 |
commit | 66189be74ff5f9f3fd6444315b85be210d07cef2 (patch) | |
tree | 7a179ddd7e233668dbb108faf847ceb768d2e92c /fs/cachefiles | |
parent | 9ebb389d0a03b4415fe9014f6922a2412cb1109c (diff) | |
download | linux-stable-66189be74ff5f9f3fd6444315b85be210d07cef2.tar.gz linux-stable-66189be74ff5f9f3fd6444315b85be210d07cef2.tar.bz2 linux-stable-66189be74ff5f9f3fd6444315b85be210d07cef2.zip |
CIFS: Fix VFS lock usage for oplocked files
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.
Cc: stable@kernel.org
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cachefiles')
0 files changed, 0 insertions, 0 deletions