osd/OSD.cc: fix possible NULL pointer deref in share_map()

Fix for:

4778 *sent_epoch_p = osdmap->get_epoch();
     12 Dereference of null pointer (loaded from variable 'sent_epoch_p')

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
libcephfs.cc: fix possible NULL pointer deref

Fix possible NULL pointer dereference of 'inode' in ceph_ll_lookup_inode().
It's not enough to check for 'inode' without assert or error handling before
assert for '*inode != NULL' since this doesn't handle the 'inode == NULL'
case for the later calls.

Fix for:
1192 r = (cmount->get_client())->lookup_parent(*inode, &parent);
     5  Dereference of null pointer (loaded from variable 'inode')

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>