libceph: add an ONSTACK initializer for oids
authorIlya Dryomov <idryomov@gmail.com>
Tue, 26 Jul 2016 13:22:35 +0000 (15:22 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 28 Jul 2016 00:55:35 +0000 (02:55 +0200)
commit281dbe5db81c6137def9757e07a7aea14b1ed86e
treea74416bd23d94120cd141a0d225ebbe309473222
parentb2aa5d0bc86cb901cc6c8737cfff66360cbff00c
libceph: add an ONSTACK initializer for oids

An on-stack oid in ceph_ioctl_get_dataloc() is not initialized,
resulting in a WARN and a NULL pointer dereference later on.  We will
have more of these on-stack in the future, so fix it with a convenience
macro.

Fixes: d30291b985d1 ("libceph: variable-sized ceph_object_id")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/ioctl.c
include/linux/ceph/osdmap.h