diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-07 10:52:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-07 10:52:26 -0800 |
commit | 9e91c144e689bb780b412c2c7908b9cf7b96f31f (patch) | |
tree | 8fe573a54384a1ff54fc0022fa6285ac9f557779 /lib | |
parent | f7d6a7283aa1de430c6323a9714d1a787bc2d1ea (diff) | |
parent | f0f3f2d0a3e0f7c48163fd8b45f5909d46e7f371 (diff) | |
download | linux-stable-9e91c144e689bb780b412c2c7908b9cf7b96f31f.tar.gz linux-stable-9e91c144e689bb780b412c2c7908b9cf7b96f31f.tar.bz2 linux-stable-9e91c144e689bb780b412c2c7908b9cf7b96f31f.zip |
Merge branch 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax
Pull idr fix (and new tests) from Matthew Wilcox:
"One urgent patch in here; freeing the correct IDA bitmap.
Everything else is changes to the test suite"
* 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax:
radix tree test suite: Specify -m32 in LDFLAGS too
ida: Free correct IDA bitmap
radix tree test suite: Depend on Makefile and quieten grep
radix tree test suite: Fix build with --as-needed
radix tree test suite: Build 32 bit binaries
radix tree test suite: Add performance test for radix_tree_join()
radix tree test suite: Add performance test for radix_tree_split()
radix tree test suite: Add performance benchmarks
radix tree test suite: Add test for radix_tree_clear_tags()
radix tree test suite: Add tests for ida_simple_get() and ida_simple_remove()
radix tree test suite: Add test for idr_get_next()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/radix-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 5ed506d648c4..691a9ad48497 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -2129,8 +2129,8 @@ int ida_pre_get(struct ida *ida, gfp_t gfp) struct ida_bitmap *bitmap = kmalloc(sizeof(*bitmap), gfp); if (!bitmap) return 0; - bitmap = this_cpu_cmpxchg(ida_bitmap, NULL, bitmap); - kfree(bitmap); + if (this_cpu_cmpxchg(ida_bitmap, NULL, bitmap)) + kfree(bitmap); } return 1; |