diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2014-04-21 03:46:37 -0400 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2014-06-05 21:29:55 -0400 |
commit | ca665e0282ece4f8121ab4de474351f291fa8c2d (patch) | |
tree | d2ad463509ad678de715e5f5d568de2c8bb03374 /fs/ceph | |
parent | 8d08503c130e96e3794f66fe47053051460b1584 (diff) |
mds: check cap ID when handling cap export message
handle following sequence of events:
- mds0 exports an inode to mds1. client receives the cap import
message from mds1. caps from mds0 are removed while handling
the cap import message.
- mds1 exports an inode to mds0. client receives the cap export
message from mds1. handle_cap_export() adds placeholder caps
for mds0
- client receives the first cap export message (for exporting
inode from mds0 to mds1)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph')
-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 9f2c99c34e92..1fde164b74b5 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -2805,7 +2805,7 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex, | |||
2805 | retry: | 2805 | retry: |
2806 | spin_lock(&ci->i_ceph_lock); | 2806 | spin_lock(&ci->i_ceph_lock); |
2807 | cap = __get_cap_for_mds(ci, mds); | 2807 | cap = __get_cap_for_mds(ci, mds); |
2808 | if (!cap) | 2808 | if (!cap || cap->cap_id != le64_to_cpu(ex->cap_id)) |
2809 | goto out_unlock; | 2809 | goto out_unlock; |
2810 | 2810 | ||
2811 | if (target < 0) { | 2811 | if (target < 0) { |