ceph: properly get capsnap's size in get_oldest_context()
authorYan, Zheng <zyan@redhat.com>
Wed, 30 Aug 2017 03:36:06 +0000 (11:36 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 6 Sep 2017 17:56:55 +0000 (19:56 +0200)
commit1f934b00e907527cddb83984d0783cc4a029952a
tree3e1f89e89c990448a8dd84d7d00e743d84902679
parentb072d774664b690768bdf7e068ee95a161e5f107
ceph: properly get capsnap's size in get_oldest_context()

capsnap's size is set by __ceph_finish_cap_snap(). If capsnap is under
writing, its size is zero. In this case, get_oldest_context() should
read i_size. Besides, ceph_writepages_start() should re-check capsnap's
size after dirty pages get locked.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c