aboutsummaryrefslogtreecommitdiffstats
path: root/block/blktrace.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-12-06 23:32:37 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:22 -0500
commita120586873d3d64de93bd6d593d237e131994e58 (patch)
treeae284884e23268e867f748a2ab52353cf2390e89 /block/blktrace.c
parentb30973f877fea1a3fb84e05599890fcc082a88e5 (diff)
[PATCH] Allow NULL pointers in percpu_free
The patch (as824b) makes percpu_free() ignore NULL arguments, as one would expect for a deallocation routine. (Note that free_percpu is #defined as percpu_free in include/linux/percpu.h.) A few callers are updated to remove now-unneeded tests for NULL. A few other callers already seem to assume that passing a NULL pointer to percpu_free() is okay! The patch also removes an unnecessary NULL check in percpu_depopulate(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'block/blktrace.c')
-rw-r--r--block/blktrace.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blktrace.c b/block/blktrace.c
index 74e02c04b2d..d3679dd1d22 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -394,8 +394,7 @@ err:
394 if (bt) { 394 if (bt) {
395 if (bt->dropped_file) 395 if (bt->dropped_file)
396 debugfs_remove(bt->dropped_file); 396 debugfs_remove(bt->dropped_file);
397 if (bt->sequence) 397 free_percpu(bt->sequence);
398 free_percpu(bt->sequence);
399 if (bt->rchan) 398 if (bt->rchan)
400 relay_close(bt->rchan); 399 relay_close(bt->rchan);
401 kfree(bt); 400 kfree(bt);