Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42780
b: refs/heads/master
c: 593be07
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Dec 7, 2006
1 parent 8320ef6 commit 28bebd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 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: e59e2ae2c29700117a54e85c106017c24837119f
refs/heads/master: 593be07ae8f6f4a1b1b98813fabb155328f8bc0c
29 changes: 2 additions & 27 deletions trunk/fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
struct fdtable_defer {
spinlock_t lock;
struct work_struct wq;
struct timer_list timer;
struct fdtable *next;
};

Expand Down Expand Up @@ -75,22 +74,6 @@ static void __free_fdtable(struct fdtable *fdt)
kfree(fdt);
}

static void fdtable_timer(unsigned long data)
{
struct fdtable_defer *fddef = (struct fdtable_defer *)data;

spin_lock(&fddef->lock);
/*
* If someone already emptied the queue return.
*/
if (!fddef->next)
goto out;
if (!schedule_work(&fddef->wq))
mod_timer(&fddef->timer, 5);
out:
spin_unlock(&fddef->lock);
}

static void free_fdtable_work(struct work_struct *work)
{
struct fdtable_defer *f =
Expand Down Expand Up @@ -144,13 +127,8 @@ static void free_fdtable_rcu(struct rcu_head *rcu)
spin_lock(&fddef->lock);
fdt->next = fddef->next;
fddef->next = fdt;
/*
* vmallocs are handled from the workqueue context.
* If the per-cpu workqueue is running, then we
* defer work scheduling through a timer.
*/
if (!schedule_work(&fddef->wq))
mod_timer(&fddef->timer, 5);
/* vmallocs are handled from the workqueue context */
schedule_work(&fddef->wq);
spin_unlock(&fddef->lock);
put_cpu_var(fdtable_defer_list);
}
Expand Down Expand Up @@ -354,9 +332,6 @@ static void __devinit fdtable_defer_list_init(int cpu)
struct fdtable_defer *fddef = &per_cpu(fdtable_defer_list, cpu);
spin_lock_init(&fddef->lock);
INIT_WORK(&fddef->wq, free_fdtable_work);
init_timer(&fddef->timer);
fddef->timer.data = (unsigned long)fddef;
fddef->timer.function = fdtable_timer;
fddef->next = NULL;
}

Expand Down

0 comments on commit 28bebd2

Please sign in to comment.