static void free_fdtable_work(struct fdtable_defer *f) { struct fdtable *fdt; spin_lock_bh(&f->lock); fdt = f->next; f->next = NULL; spin_unlock_bh(&f->lock); while(fdt) { struct fdtable *next = fdt->next; __free_fdtable(fdt); fdt = next; } }
static void free_fdtable_work(struct work_struct *work) { struct fdtable_defer *f = container_of(work, struct fdtable_defer, wq); struct fdtable *fdt; spin_lock_bh(&f->lock); fdt = f->next; f->next = NULL; spin_unlock_bh(&f->lock); while(fdt) { struct fdtable *next = fdt->next; __free_fdtable(fdt); fdt = next; } }