On Sun, 2011-01-09 at 11:35 -0500, David Dillow wrote: > On Sun, 2011-01-09 at 16:59 +0100, Bart Van Assche wrote: > > On Wed, Jan 5, 2011 at 9:35 PM, David Dillow <[email protected]> wrote: > > > From: Bart Van Assche <[email protected]> > > > > + list_del_init(&target->free_tx); > > > + for (i = 0; i < SRP_SQ_SIZE; ++i) > > > + list_move(&target->tx_ring[i]->list, &target->free_tx); > > > > > > target->qp_in_error = 0; > > > ret = srp_connect_target(target); > > > Sorry that I hadn't noticed this before: invoking list_del_init() on > > &target->free_tx seems strange to me since &target->free_tx is a list > > head and not a list element. While list_del_init() will probably work > > fine here, using INIT_LIST_HEAD() here seems more appropriate to me. > > Yeah, it works, but INIT_LIST_HEAD() would be more appropriate. I'll fix > that when I put this in my repository.
Actually, using INIT_LIST_HEAD() here on a non-empty free_tx corrupts things when used with list_move(). That's not a problem in the next patch, where we transition to list_add(), so I made the change in patch 4. Thinking about it, we could just do an INIT_LIST_HEAD() here on both free_tx and req_queue, and move to list_add() here. However, I've already retested the change in patch 4 and pushed to git, so I'm going to leave this be. -- Dave Dillow National Center for Computational Science Oak Ridge National Laboratory (865) 241-6602 office -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
