ceph: fix readpage from fscache
authorYan, Zheng <zyan@redhat.com>
Fri, 4 Aug 2017 03:22:31 +0000 (11:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Sep 2017 06:34:09 +0000 (08:34 +0200)
commit857d0b3dd7566ebb70686a009c7100322ddf3bbe
tree0bfda01d6493f4a8243cf638a501b2fa7a82aa95
parent043ccc9781cc2e2914253c1c6f17923905c83a4e
ceph: fix readpage from fscache

commit dd2bc473482eedc60c29cf00ad12568ce40ce511 upstream.

ceph_readpage() unlocks page prematurely prematurely in the case
that page is reading from fscache. Caller of readpage expects that
page is uptodate when it get unlocked. So page shoule get locked
by completion callback of fscache_read_or_alloc_pages()

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/addr.c
fs/ceph/cache.c