diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-08-28 03:07:42 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-09-06 13:56:53 -0400 |
commit | fa0aa3b839b922c7bb911dbe2435da2a4e59d82d (patch) | |
tree | 41bd7b7f3c2766b2c03c516b99b6e17f77268fb2 /fs/ceph/caps.c | |
parent | c858a0709f991171256db74f4329a1cb8e823764 (diff) |
ceph: fix message order check in handle_cap_export()
If caps for importer mds exists, but cap id mismatch, client should
have received corresponding import message. Because cap ID does not
change as long as client holds the caps.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 5daf86621871..7a7945032802 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -3427,7 +3427,7 @@ retry: | |||
3427 | tcap = __get_cap_for_mds(ci, target); | 3427 | tcap = __get_cap_for_mds(ci, target); |
3428 | if (tcap) { | 3428 | if (tcap) { |
3429 | /* already have caps from the target */ | 3429 | /* already have caps from the target */ |
3430 | if (tcap->cap_id != t_cap_id || | 3430 | if (tcap->cap_id == t_cap_id && |
3431 | ceph_seq_cmp(tcap->seq, t_seq) < 0) { | 3431 | ceph_seq_cmp(tcap->seq, t_seq) < 0) { |
3432 | dout(" updating import cap %p mds%d\n", tcap, target); | 3432 | dout(" updating import cap %p mds%d\n", tcap, target); |
3433 | tcap->cap_id = t_cap_id; | 3433 | tcap->cap_id = t_cap_id; |