summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-08-16 21:42:39 +0800
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 19:56:49 +0200
commit92776fd2c230f80be910cf33acd99682345209cd (patch)
treeb71a1efaddb6717cc9c3717365b1c28dfb5dd775 /fs/ceph
parentb178cf4304f26551cb05915eb6c6b1736617366b (diff)
downloadlinux-stable-92776fd2c230f80be910cf33acd99682345209cd.tar.gz
linux-stable-92776fd2c230f80be910cf33acd99682345209cd.tar.bz2
linux-stable-92776fd2c230f80be910cf33acd99682345209cd.zip
ceph: properly set snap follows for cap reconnect
Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/mds_client.c2
1 files changed, 1 insertions, 1 deletions
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,