Re: bad slaves count in eql driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Saturday 04 September 2004 à 00:45:13 +0200, Loic Le Loarer a écrit:
> Le Friday 03 September 2004 à 09:47:59 -0700, David S. Miller a écrit:
> > Why not just decrement the counter in *_kill_one_slave()?
> 
> Sure, it would be better, but num_slaves is a member of struct
> slave_queue which is not given in the arguments of eql_kill_one_slave
> and the decrement already appears after one of the eql_kill_one_slave
> calls, so I correct the situation the same way, which is also the
> fastest way.
> 
> I agree it should be better for futur to decrement the counter in
> eql_kill_one_slave, this require to add the queue or the counter address
> as an argument to this function, it may seem strange, but it is less
> error prone and futur proof.
> 
> So here is a patch which use this method, chose the one you prefer.

I confirm that the second patch is the best, in the first version, I
have just discovered that I forget to decrement num_slaves after one of
the call to eql_kill_one_slave, so decremnting in eql_kill_one_slave is
much better !

Please consider my second patch.

Regards

-- 
Loïc

"heaven is not a place, it's a feeling"

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux