Skip to content

Commit

Permalink
ceph: allocate cap_release message when receiving cap import
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
Yan, Zheng authored and Alex Elder committed Jan 17, 2013
1 parent 395c312 commit 66f5869
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2833,6 +2833,9 @@ void ceph_handle_caps(struct ceph_mds_session *session,
dout(" mds%d seq %lld cap seq %u\n", session->s_mds, session->s_seq,
(unsigned)seq);

if (op == CEPH_CAP_OP_IMPORT)
ceph_add_cap_releases(mdsc, session);

/* lookup ino */
inode = ceph_find_inode(sb, vino);
ci = ceph_inode(inode);
Expand Down

0 comments on commit 66f5869

Please sign in to comment.