From db20fa00ca9880e6e661befee92e19194fa5e69a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 5 Feb 2015 12:14:32 +0100 Subject: xmalloc: Make xrealloc() arguments conform to realloc() xrealloc() has an additional nmemb argument compared to realloc() for which it should serve as a wrapper. Since we always call with nmemb = 1, we might as well remove this argument and thus have xrealloc() conform to the realloc() function prototype. Signed-off-by: Tobias Klauser --- xmalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmalloc.h') diff --git a/xmalloc.h b/xmalloc.h index 2ad0372..5d96f48 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -13,7 +13,7 @@ extern void *xmallocz(size_t size) __hidden; extern void *xmalloc_aligned(size_t size, size_t alignment) __hidden; extern void *xzmalloc_aligned(size_t size, size_t alignment) __hidden; extern void *xmemdupz(const void *data, size_t len) __hidden; -extern void *xrealloc(void *ptr, size_t nmemb, size_t size) __hidden; +extern void *xrealloc(void *ptr, size_t size) __hidden; extern void xfree_func(void *ptr) __hidden; extern char *xstrdup(const char *str) __hidden; extern char *xstrndup(const char *str, size_t size) __hidden; -- cgit v1.2.3-54-g00ecf te-remove net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-10-27 09:49:19 -0600
committerJens Axboe <axboe@fb.com>2016-10-27 09:56:03 -0600
commit7fe311302f7d52601cd799ad508a6f92cb3d748d (patch)
tree9ee240140ac26203b706e4b8e277dcea147f5d51
parent94d7dea448fae6cbb83395323c1d2fd7f19dc388 (diff)
blk-mq: update hardware and software queues for sleeping alloc
If we end up sleeping due to running out of requests, we should update the hardware and software queues in the map ctx structure. Otherwise we could end up having rq->mq_ctx point to the pre-sleep context, and risk corrupting ctx->rq_list since we'll be grabbing the wrong lock when inserting the request. Reported-by: Dave Jones <davej@codemonkey.org.uk> Reported-by: Chris Mason <clm@fb.com> Tested-by: Chris Mason <clm@fb.com> Fixes: 63581af3f31e ("blk-mq: remove non-blocking pass in blk_mq_map_request") Signed-off-by: Jens Axboe <axboe@fb.com>