Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c80e7a826c10cf5bce8487fbaede48bd0bd48d08 Commit: c80e7a826c10cf5bce8487fbaede48bd0bd48d08 Parent: 5e70030d4cf91613530a23b40ad9919bb9ee114f Author: Rusty Russell <[EMAIL PROTECTED]> AuthorDate: Sun Jul 15 23:42:00 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Jul 16 09:05:52 2007 -0700
permit mempool_free(NULL) Christian Borntraeger points out that mempool_free() doesn't noop when handed NULL. This is inconsistent with the other free-like functions in the kernel. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Cc: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- mm/mempool.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/mm/mempool.c b/mm/mempool.c index cc1ca86..3e8f1fe 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -263,6 +263,9 @@ void mempool_free(void *element, mempool_t *pool) { unsigned long flags; + if (unlikely(element == NULL)) + return; + smp_mb(); if (pool->curr_nr < pool->min_nr) { spin_lock_irqsave(&pool->lock, flags); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html