ceph: don't update importing cap's mseq when handing cap export
authorYan, Zheng <zyan@redhat.com>
Thu, 29 Nov 2018 03:22:50 +0000 (11:22 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 26 Dec 2018 15:08:25 +0000 (16:08 +0100)
Updating mseq makes client think importer mds has accepted all prior
cap messages and importer mds knows what caps client wants. Actually
some cap messages may have been dropped because of mseq mismatch.

If mseq is left untouched, importing cap's mds_wanted later will get
reset by cap import message.

Cc: stable@vger.kernel.org
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c

index f3496db4bb3e80d24adec6413168b20299321439..a58666a3f8dd0c7083744c17a65bf3d12a795e2e 100644 (file)
@@ -3569,7 +3569,6 @@ retry:
                        tcap->cap_id = t_cap_id;
                        tcap->seq = t_seq - 1;
                        tcap->issue_seq = t_seq - 1;
-                       tcap->mseq = t_mseq;
                        tcap->issued |= issued;
                        tcap->implemented |= issued;
                        if (cap == ci->i_auth_cap)