diff options
author | Yan, Zheng <ukernel@gmail.com> | 2014-03-19 05:25:05 +0100 |
---|---|---|
committer | Yan, Zheng <ukernel@gmail.com> | 2014-03-19 05:25:05 +0100 |
commit | 002c7e7544cbded3a8473a055fdc9a999f681855 (patch) | |
tree | 340e540f54e8ca4dea8d12cabfaa863a3f439e35 | |
parent | Merge pull request #1499 from ceph/wip-no-version (diff) | |
parent | mds/Locker: fix null deref on cap import (diff) | |
download | ceph-002c7e7544cbded3a8473a055fdc9a999f681855.tar.xz ceph-002c7e7544cbded3a8473a055fdc9a999f681855.zip |
Merge pull request #1496 from ceph/wip-7708
mds/Locker: fix null deref on cap import
-rw-r--r-- | src/mds/Locker.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 1906c49bc4c..e69e985accb 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -1799,8 +1799,10 @@ bool Locker::issue_caps(CInode *in, Capability *only_cap) // add in any xlocker-only caps (for locks this client is the xlocker for) allowed |= xlocker_allowed & in->get_xlocker_mask(it->first); + Session *session = mds->get_session(it->first); if (in->inode.inline_version != CEPH_INLINE_NONE && - !mds->get_session(it->first)->connection->has_feature(CEPH_FEATURE_MDS_INLINE_DATA)) + !(session && session->connection && + session->connection->has_feature(CEPH_FEATURE_MDS_INLINE_DATA))) allowed &= ~(CEPH_CAP_FILE_RD | CEPH_CAP_FILE_WR); int pending = cap->pending(); |