From patchwork Fri Mar 6 13:27:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 24150 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 09FA0DDF48 for ; Sat, 7 Mar 2009 00:53:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754027AbZCFNx0 (ORCPT ); Fri, 6 Mar 2009 08:53:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753896AbZCFNxZ (ORCPT ); Fri, 6 Mar 2009 08:53:25 -0500 Received: from lanfw001a.cxnet.dk ([87.72.215.196]:45514 "EHLO lanfw001a.cxnet.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753660AbZCFNxX (ORCPT ); Fri, 6 Mar 2009 08:53:23 -0500 Received: from localhost.localdomain (unknown [172.31.4.93]) by lanfw001a.cxnet.dk (Postfix) with ESMTP id 3C1D51637D7; Fri, 6 Mar 2009 14:27:38 +0100 (CET) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 27891CBA36; Fri, 6 Mar 2009 14:27:38 +0100 (CET) From: Jesper Dangaard Brouer Subject: [PATCH 2/2] Doc: Fix wrong API example usage of call_rcu(). To: David Miller Cc: netdev@vger.kernel.org, paulmck@us.ibm.com Date: Fri, 06 Mar 2009 14:27:38 +0100 Message-ID: <20090306132738.15896.2226.stgit@localhost.localdomain> In-Reply-To: <20090306132732.15896.96543.stgit@localhost.localdomain> References: <20090306132732.15896.96543.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org At some point the API of call_rcu() changed from three parameters to two parameters, correct the documentation. One confusing thing in RCU/listRCU.txt, which is NOT fixed in this patch, is that no reason or explaination is given for using call_rcu() instead of the normal synchronize_rcu() call. Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Paul E. McKenney --- Documentation/RCU/listRCU.txt | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/RCU/listRCU.txt b/Documentation/RCU/listRCU.txt index 1fd1753..4349c14 100644 --- a/Documentation/RCU/listRCU.txt +++ b/Documentation/RCU/listRCU.txt @@ -118,7 +118,7 @@ Following are the RCU equivalents for these two functions: list_for_each_entry(e, list, list) { if (!audit_compare_rule(rule, &e->rule)) { list_del_rcu(&e->list); - call_rcu(&e->rcu, audit_free_rule, e); + call_rcu(&e->rcu, audit_free_rule); return 0; } } @@ -206,7 +206,7 @@ RCU ("read-copy update") its name. The RCU code is as follows: ne->rule.action = newaction; ne->rule.file_count = newfield_count; list_replace_rcu(e, ne); - call_rcu(&e->rcu, audit_free_rule, e); + call_rcu(&e->rcu, audit_free_rule); return 0; } } @@ -283,7 +283,7 @@ flag under the spinlock as follows: list_del_rcu(&e->list); e->deleted = 1; spin_unlock(&e->lock); - call_rcu(&e->rcu, audit_free_rule, e); + call_rcu(&e->rcu, audit_free_rule); return 0; } }