LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org, rcu@vger.kernel.org,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] doc/rcu: Correct field_count field naming in examples
Date: Mon, 6 May 2019 17:04:53 -0700	[thread overview]
Message-ID: <20190507000453.GB3923@linux.ibm.com> (raw)
In-Reply-To: <20190505020328.165839-1-joel@joelfernandes.org>

On Sat, May 04, 2019 at 10:03:10PM -0400, Joel Fernandes (Google) wrote:
> I believe this field should be called field_count instead of file_count.
> Correct the doc with the same.
> 
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>

But if we are going to update this, why not update it with the current
audit_filter_task(), audit_del_rule(), and audit_add_rule() code?

Hmmm...  One reason is that some of them have changed beyond recognition.

And this example code predates v2.6.12.  ;-)

So good eyes, but I believe that this really does reflect the ancient
code...

On the other hand, would you have ideas for more modern replacement
examples?

							Thanx, Paul

> ---
>  Documentation/RCU/listRCU.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/RCU/listRCU.txt b/Documentation/RCU/listRCU.txt
> index adb5a3782846..190e666fc359 100644
> --- a/Documentation/RCU/listRCU.txt
> +++ b/Documentation/RCU/listRCU.txt
> @@ -175,7 +175,7 @@ otherwise, the added fields would need to be filled in):
>  		list_for_each_entry(e, list, list) {
>  			if (!audit_compare_rule(rule, &e->rule)) {
>  				e->rule.action = newaction;
> -				e->rule.file_count = newfield_count;
> +				e->rule.field_count = newfield_count;
>  				write_unlock(&auditsc_lock);
>  				return 0;
>  			}
> @@ -204,7 +204,7 @@ RCU ("read-copy update") its name.  The RCU code is as follows:
>  					return -ENOMEM;
>  				audit_copy_rule(&ne->rule, &e->rule);
>  				ne->rule.action = newaction;
> -				ne->rule.file_count = newfield_count;
> +				ne->rule.field_count = newfield_count;
>  				list_replace_rcu(&e->list, &ne->list);
>  				call_rcu(&e->rcu, audit_free_rule);
>  				return 0;
> -- 
> 2.21.0.1020.gf2820cf01a-goog
> 


  reply	other threads:[~2019-05-07  0:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-05  2:03 [PATCH] doc/rcu: Correct field_count field naming in examples Joel Fernandes (Google)
2019-05-07  0:04 ` Paul E. McKenney [this message]
2019-05-08 16:26   ` Joel Fernandes
2019-05-08 18:16     ` Paul E. McKenney
2019-05-11 22:11       ` Andrea Parri
2019-05-12  0:41         ` Paul E. McKenney
2019-05-12  1:09           ` Andrea Parri
2019-05-13  3:43       ` Joel Fernandes
2019-05-14 22:13         ` Paul E. McKenney
2019-05-25 10:07       ` Joel Fernandes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190507000453.GB3923@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=corbet@lwn.net \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).