]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: Fix VFS lock usage for oplocked files
authorPavel Shilovsky <piastry@etersoft.ru>
Tue, 27 Mar 2012 11:36:15 +0000 (15:36 +0400)
committerSteve French <sfrench@us.ibm.com>
Sat, 31 Mar 2012 22:30:48 +0000 (17:30 -0500)
commitb6b8aa43d6426942857a5a6b37295b97ee375991
tree18d46e1ef3bdf9bbb2df7f8e72b0c1e2ac2919fd
parentbe8c2f54996bdd10c56186317f51569b107680b2
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 another process blocked on the lock in the
same time.

Fix this by removing lock_mutex protection from waiting on a
blocked lock and protect only posix_lock_file call.

Cc: stable@kernel.org
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/file.c