summaryrefslogtreecommitdiff
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-09-19 23:47:01 -0700
committerLinux Build Service Account <lnxbuild@localhost>2019-09-19 23:47:01 -0700
commitd4009ffcd8674d76a77441c1edaefcb886668fb9 (patch)
tree7b2ca75730e4f9de891b22efdbd5babf3e6381b1 /include/linux/ceph
parent88dccf7d633bf154097ee158ec19965bdc1cc429 (diff)
parent36f663352d8e241b313ae19a94c5d30ea077e243 (diff)
Merge 36f663352d8e241b313ae19a94c5d30ea077e243 on remote branch
Change-Id: I65222b09858e0e72a2532954573a1d191882e6c3
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ceph/buffer.h b/include/linux/ceph/buffer.h
index 07ca15e76100..dada47a4360f 100644
--- a/include/linux/ceph/buffer.h
+++ b/include/linux/ceph/buffer.h
@@ -29,7 +29,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);