]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: Locker: fix a NULL deref in _update_cap_fields 2679/head
authorGreg Farnum <greg@inktank.com>
Thu, 9 Oct 2014 22:12:19 +0000 (15:12 -0700)
committerGreg Farnum <greg@inktank.com>
Thu, 9 Oct 2014 22:12:19 +0000 (15:12 -0700)
commit3cd8a7fb9683577a7d6e934f18c29b7e84415be6
tree1b57f51705d4ee0f04956e27fc5ae6fdef22ecd9
parent3bfb5fab41b6247259183c3f52c786e35beb3b01
mds: Locker: fix a NULL deref in _update_cap_fields

The MClientCaps* is allowed to be NULL, so we can't deref it unless
the dirty param is non-zero. So don't do the ahead-of-time lookup;
just call it explicitly in the if block.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/mds/Locker.cc