K 10 svn:author V 3 kib K 8 svn:date V 27 2012-03-07T18:33:11.325518Z K 7 svn:log V 1900 Synchronize nullfs with HEAD, mostly merge all locking changes. Tested by: pho MFC r229428: Document the state of the lowervp vnode for null_nodeget(). MFC r229431: Do the vput() for the lowervp in the null_nodeget() for error case too. Several callers of null_nodeget() did the cleanup itself, but several missed it, most prominent being null_bypass(). Remove the cleanup from the callers, now null_nodeget() handles lowervp free itself. MFC r229600 (by dim): In sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode pointer 'lowervp' instead of 'vp', which is uninitialized at that point. MFC r230304 (by rea): Use hashdestroy() instead of naive free(). MFC r232299: Move the code to destroy half-contructed nullfs vnode into helper function null_destroy_proto() from null_insmntque_dtr(). Also apply null_destroy_proto() in null_nodeget() when we raced and a vnode is found in the hash, so the currently allocated protonode shall be destroyed. Lock the vnode interlock around reassigning the v_vnlock. MFC r232301: Always request exclusive lock for the lower vnode in nullfs_vget(). The null_nodeget() requires exclusive lock on lowervp to be able to insmntque() new vnode. MFC r232303: In null_reclaim(), assert that reclaimed vnode is fully constructed, instead of accepting half-constructed vnode. Previous code cannot decide what to do with such vnode anyway, and although processing it for hash removal, paniced later when getting rid of nullfs reference on lowervp. While there, remove initializations from the declaration block. MFC r232304: Document that null_nodeget() cannot take shared-locked lowervp due to insmntque() requirements. MFC r232305: Allow shared locks for reads when lower filesystem accept shared locking. MFC r232383: Do not expose unlocked unconstructed nullfs vnode on mount list. Lock the native nullfs vnode lock before switching the locks. END