projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1abaeb
)
libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
author
Luis Henriques
<lhenriques@suse.com>
Fri, 19 Jul 2019 14:32:19 +0000
(15:32 +0100)
committer
Ilya Dryomov
<idryomov@gmail.com>
Thu, 22 Aug 2019 08:47:41 +0000
(10:47 +0200)
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
include/linux/ceph/buffer.h
patch
|
blob
|
history
diff --git
a/include/linux/ceph/buffer.h
b/include/linux/ceph/buffer.h
index
5e58bb2
..
11cdc7c
100644
(file)
--- a/
include/linux/ceph/buffer.h
+++ b/
include/linux/ceph/buffer.h
@@
-30,7
+30,8
@@
static inline struct ceph_buffer *ceph_buffer_get(struct ceph_buffer *b)
static inline void ceph_buffer_put(struct ceph_buffer *b)
{
- kref_put(&b->kref, ceph_buffer_release);
+ if (b)
+ kref_put(&b->kref, ceph_buffer_release);
}
extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);