diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/ceph/buffer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ceph/buffer.h b/include/linux/ceph/buffer.h index 5e58bb29b1a3..11cdc7c60480 100644 --- 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) | |||
| 30 | 30 | ||
| 31 | static inline void ceph_buffer_put(struct ceph_buffer *b) | 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 | extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end); | 37 | extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end); |
