Hi All,
   I might be missing something here, i would appreciate if someone
helps me understand this:
The following piece of code is from the unregister_netdevice() function.
I would like to know why no read_lock is acquired when looping thru the
list. or why the write_lock isn't acquired before the start of the loop.
I've seen similar code in other files too.

Also i'd greatly appreciate if someone can explain the differences between
write_lock() and write_lock_bh().

Thanks,
Anand

 /* And unlink it from device chain. */
         for (dp = &dev_base; (d=*dp) != NULL; dp=&d->next) {
                 if (d == dev) {
                         write_lock_bh(&dev_base_lock);
                         *dp = d->next;
                         write_unlock_bh(&dev_base_lock);
                         break;
                 }
         }

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to