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:35:40 +0000 (08:35 +0200)
commit715849268b3418a94ee1330be2c4ca966df83d90
tree6dca16f96d31bbc7828992fbb68a96d53e926709
parent8cc3acff5f1a99b153146643c6dd322edef11e21
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