ceph: properly set snap follows for cap reconnect

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Yan, Zheng 2017-08-16 21:42:39 +08:00 committed by Ilya Dryomov
parent b178cf4304
commit 92776fd2c2

View File

@ -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,