Commit c7d7d267 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] increase list_del_init usage.

parent 35a79db4
......@@ -941,8 +941,7 @@ static void usb_hub_events(void)
hub = list_entry(tmp, struct usb_hub, event_list);
dev = interface_to_usbdev(hub->intf);
list_del(tmp);
INIT_LIST_HEAD(tmp);
list_del_init(tmp);
down(&hub->khubd_sem); /* never blocks, we were on list */
spin_unlock_irqrestore(&hub_event_lock, flags);
......
......@@ -755,8 +755,7 @@ void usbfs_remove_device(struct usb_device *dev)
}
while (!list_empty(&dev->filelist)) {
ds = list_entry(dev->filelist.next, struct dev_state, list);
list_del(&ds->list);
INIT_LIST_HEAD(&ds->list);
list_del_init(&ds->list);
down_write(&ds->devsem);
ds->dev = NULL;
up_write(&ds->devsem);
......
......@@ -1207,8 +1207,7 @@ static void hc_release_hci (hci_t * hci)
usb_deregister_bus (hci->bus);
usb_free_bus (hci->bus);
list_del (&hci->hci_hcd_list);
INIT_LIST_HEAD (&hci->hci_hcd_list);
list_del_init (&hci->hci_hcd_list);
kfree (hci);
}
......
......@@ -190,8 +190,7 @@ static inline void insert_dquot_hash(struct dquot *dquot)
static inline void remove_dquot_hash(struct dquot *dquot)
{
list_del(&dquot->dq_hash);
INIT_LIST_HEAD(&dquot->dq_hash);
list_del_init(&dquot->dq_hash);
}
static inline struct dquot *find_dquot(unsigned int hashent, struct super_block *sb, unsigned int id, int type)
......@@ -232,8 +231,7 @@ static inline void remove_free_dquot(struct dquot *dquot)
{
if (list_empty(&dquot->dq_free))
return;
list_del(&dquot->dq_free);
INIT_LIST_HEAD(&dquot->dq_free);
list_del_init(&dquot->dq_free);
dqstats.free_dquots--;
}
......@@ -729,8 +727,7 @@ void put_dquot_list(struct list_head *tofree_head)
while (act_head != tofree_head) {
dquot = list_entry(act_head, struct dquot, dq_free);
act_head = act_head->next;
list_del(&dquot->dq_free); /* Remove dquot from the list so we won't have problems... */
INIT_LIST_HEAD(&dquot->dq_free);
list_del_init(&dquot->dq_free); /* Remove dquot from the list so we won't have problems... */
dqput(dquot);
}
unlock_kernel();
......
......@@ -156,8 +156,7 @@ extern rwlock_t dparent_lock;
static __inline__ void d_drop(struct dentry * dentry)
{
spin_lock(&dcache_lock);
list_del(&dentry->d_hash);
INIT_LIST_HEAD(&dentry->d_hash);
list_del_init(&dentry->d_hash);
spin_unlock(&dcache_lock);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment