Re: [patch-2.3.99-pre6-5] __put_unused_fd()/put_unused_fd() improved

From: Linus Torvalds (torvalds@transmeta.com)
Date: Sun Apr 23 2000 - 20:05:58 EST


On Sun, 23 Apr 2000, Tigran Aivazian wrote:
>
> I have redone the previous patch "do_close optimization" in a
> hopefully better way - namely, adding a 'struct task_struct *tsk' argument
> to __put_unused_fd and making put_unused_fd(fd) call
> __put_unused_fd(current, fd). I think it is a good idea to allow things
> like __put_unused_fd() (see patch below) to be called outside of 'current'
> context, e.g. when you want to mess with some other process' descriptors.

This is insane.

It makes no sense to pass in "tsk". If you want to mess with somebodys
files, you pass in "struct files_struct", not "struct task_struct". Which
would clean up the code more, anyway.

                Linus

-
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/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:22 EST