From: Yan, Zheng Date: Wed, 16 Aug 2017 13:42:39 +0000 (+0800) Subject: ceph: properly set snap follows for cap reconnect X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92776fd2c230f80be910cf33acd99682345209cd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ceph: properly set snap follows for cap reconnect Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 86ff74424df4..e53437154cfe 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2882,7 +2882,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap, } if (list_empty(&ci->i_cap_snaps)) { - snap_follows = 0; + snap_follows = ci->i_head_snapc ? ci->i_head_snapc->seq : 0; } else { struct ceph_cap_snap *capsnap = list_first_entry(&ci->i_cap_snaps,