diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-01-04 01:45:18 -0500 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-01-17 13:42:38 -0500 |
commit | 66f58691c5c820283dd7e4d6fe8649033ed43ceb (patch) | |
tree | 41fe310fdb2e3d47d61fb4489951090a1b4608fe /fs/ceph | |
parent | 395c312b9c535d57db122cbb5b7292223561d0b8 (diff) |
ceph: allocate cap_release message when receiving cap import
When client wants to release an imported cap, it's possible there
is no reserved cap_release message in corresponding mds session.
so __queue_cap_release causes kernel panic.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 76b19239c426..40b5bbe63a39 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -2833,6 +2833,9 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2833 | dout(" mds%d seq %lld cap seq %u\n", session->s_mds, session->s_seq, | 2833 | dout(" mds%d seq %lld cap seq %u\n", session->s_mds, session->s_seq, |
2834 | (unsigned)seq); | 2834 | (unsigned)seq); |
2835 | 2835 | ||
2836 | if (op == CEPH_CAP_OP_IMPORT) | ||
2837 | ceph_add_cap_releases(mdsc, session); | ||
2838 | |||
2836 | /* lookup ino */ | 2839 | /* lookup ino */ |
2837 | inode = ceph_find_inode(sb, vino); | 2840 | inode = ceph_find_inode(sb, vino); |
2838 | ci = ceph_inode(inode); | 2841 | ci = ceph_inode(inode); |