Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292371
b: refs/heads/master
c: 104bb37
h: refs/heads/master
i:
  292369: 89be31a
  292367: e734a00
v: v3
  • Loading branch information
Al Viro committed Mar 21, 2012
1 parent f12d9e4 commit bc8abc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 342827d7d19cb52b562bb3efeb4d4b672d008c35
refs/heads/master: 104bb37d3e0eb576b6aa61b9ed909e118e026bd2
9 changes: 3 additions & 6 deletions trunk/drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1569,20 +1569,18 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)

static void destroy_ep_files (struct dev_data *dev)
{
struct list_head *entry, *tmp;

DBG (dev, "%s %d\n", __func__, dev->state);

/* dev->state must prevent interference */
restart:
spin_lock_irq (&dev->lock);
list_for_each_safe (entry, tmp, &dev->epfiles) {
while (!list_empty(&dev->epfiles)) {
struct ep_data *ep;
struct inode *parent;
struct dentry *dentry;

/* break link to FS */
ep = list_entry (entry, struct ep_data, epfiles);
ep = list_first_entry (&dev->epfiles, struct ep_data, epfiles);
list_del_init (&ep->epfiles);
dentry = ep->dentry;
ep->dentry = NULL;
Expand All @@ -1605,8 +1603,7 @@ static void destroy_ep_files (struct dev_data *dev)
dput (dentry);
mutex_unlock (&parent->i_mutex);

/* fds may still be open */
goto restart;
spin_lock_irq (&dev->lock);
}
spin_unlock_irq (&dev->lock);
}
Expand Down

0 comments on commit bc8abc6

Please sign in to comment.