]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: ensure that we always do cifsFileInfo_get under the spinlock
authorJeff Layton <jlayton@redhat.com>
Wed, 25 Jul 2012 18:59:54 +0000 (14:59 -0400)
committerSteve French <smfrench@gmail.com>
Wed, 25 Jul 2012 19:51:30 +0000 (14:51 -0500)
commit829420d6fad8e03f83bf78564f8e5703e30db42d
treeaf7744be5e620a924d057a8593babea75be5799d
parent8af8f3b886c5cbc25b31086710c22dcd9c47ce22
cifs: ensure that we always do cifsFileInfo_get under the spinlock

The readpages bug is a regression that was introduced in 1df83a196.
This also fixes a couple of similar bugs in the uncached read and write
codepaths.

Also, prevent this sort of thing in the future by having cifsFileInfo_get
take the spinlock itself, and adding a _locked variant for use in places
that are already holding the lock. The _put code has always done that
so this makes for a less confusing interface.

Cc: <stable@vger.kernel.org> # 3.5.x
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifsglob.h
fs/cifs/file.c