-
- Downloads
dm: drop NULL test before kmem_cache_destroy() and mempool_destroy()
Remove DM's unneeded NULL tests before calling these destroy functions, now that they check for NULL, thanks to these v4.3 commits: 3942d299 ("mm/slab_common: allow NULL cache pointer in kmem_cache_destroy()") 4e3ca3e0 ("mm/mempool: allow NULL `pool' pointer in mempool_destroy()") The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // </smpl> Signed-off-by:Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
Mike Snitzer <snitzer@redhat.com>
Showing
- drivers/md/dm-bufio.c 2 additions, 6 deletionsdrivers/md/dm-bufio.c
- drivers/md/dm-cache-target.c 1 addition, 2 deletionsdrivers/md/dm-cache-target.c
- drivers/md/dm-crypt.c 2 additions, 4 deletionsdrivers/md/dm-crypt.c
- drivers/md/dm-io.c 1 addition, 2 deletionsdrivers/md/dm-io.c
- drivers/md/dm-log-userspace-base.c 1 addition, 2 deletionsdrivers/md/dm-log-userspace-base.c
- drivers/md/dm-region-hash.c 1 addition, 3 deletionsdrivers/md/dm-region-hash.c
- drivers/md/dm.c 4 additions, 9 deletionsdrivers/md/dm.c
Loading
Please register or sign in to comment