Messages in this thread | | | Date | Tue, 18 Jul 2000 19:43:54 +0100 (BST) | From | Tigran Aivazian <> | Subject | Re: [patch-2.4.0-test5-pre1] nullfs and forced umount |
| |
On Tue, 18 Jul 2000, Tigran Aivazian wrote: > repeat: > read_lock(&tasklist_lock); > for_each_task(p) { > blabla, need to block next > task_lock(p); > get_task_struct(p); > task_unlock(p); > read_unlock(&tasklist_lock); > block and manipulate p > goto repeat; > }
actually, the above is wrong - there is no need for task_lock/unlock around get_task_struct because the count is atomic. Also, where is put_task_struct() (which should atomic_dec() the same count).
regards, Tigran
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |