Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

authored by

Luis Henriques and committed by
Ilya Dryomov
5c498950 d1abaeb3

+2 -1
+2 -1
include/linux/ceph/buffer.h
··· 30 30 31 31 static inline void ceph_buffer_put(struct ceph_buffer *b) 32 32 { 33 - kref_put(&b->kref, ceph_buffer_release); 33 + if (b) 34 + kref_put(&b->kref, ceph_buffer_release); 34 35 } 35 36 36 37 extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);