Re: namei() and opening files in the kernel

Alan Cox (alan@cymru.net)
Wed, 1 May 1996 09:35:18 +0100 (BST)


> My question is: am I doing something I shouldn't? If so, how should I be doing this? If not, any ideas about what I might be doing wrong?

To make calls with kernel space as if it were user space you do:

int fs=get_fs();
set_fs(get_ds());

somefunction();

set_fs(get_fs());

Alan