On Wed, 2012-03-21 at 11:20 -0400, bjschuma@xxxxxxxxxx wrote: > > +static int find_nfs_version(struct nfs_subversion **nfs, unsigned int version) > +{ > + struct nfs_subversion *tmp; > + spin_lock(&nfs_version_lock); > + > + list_for_each_entry_safe((*nfs), tmp, &nfs_versions, list) { > + if ((*nfs)->version == version) { > + spin_unlock(&nfs_version_lock); > + return 1; > + } > + }; > + BTW: The above function needs to call try_module_get() under the nfs_version_lock. Otherwise you will not be guaranteed that the module still exists and is live when you try to use the pointer '*nfs'. -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@xxxxxxxxxx www.netapp.com ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥