lkml.org 
[lkml]   [2019]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] doc/rcu: Correct field_count field naming in examples
    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
    >

    \
     
     \ /
      Last update: 2019-05-07 02:05    [W:3.467 / U:0.204 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site