[openib-general] Re: [PATCH] Fix to backport infinipath_core.c to 2.6.9

Roland Dreier rolandd at cisco.com
Tue Oct 18 16:51:19 PDT 2005


    > Uhm, in 2.6.13, i get:
    > grundler <496>find -name \*.c | xargs fgrep ".owner =" | wc
    >     569    2429   32166

    > I am getting some false positives in that count though.

Yes, many many false positives.  By far the majority of your hits are
against other structures like struct file_operations that have an
owner member.

    > I expect the key uses are for sysfs:
    > ./fs/sysfs/bin.c:       if (!try_module_get(attr->attr.owner)) 
    > ./fs/sysfs/bin.c:       module_put(attr->attr.owner);
    > ./fs/sysfs/bin.c:       module_put(attr->attr.owner);

This owner field is in struct attribute and gets set elsewhere.

I asked on lkml and got the answer in http://lkml.org/lkml/2005/10/18/169
which is that it's not really used for ref counting yet, but it does
put a symlink in sysfs that may be useful.

 - R.



More information about the general mailing list