Skip to contentSkip to conversation

open files in kjounald (2)

PATCH Ph. Marek 1 participant 1 message Apr 22, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Ph. Marek

author
#1 lore raw
Quoted 13 lines
Quoted 2 lines

Confused. The daemonize() call makes kjournald use init's files:

That's because in daemonize() we have:

       exit_files(current);
       current->files = init_task.files;		<====
       atomic_inc(&current->files->count);	<====

But why should a kernel-daemon need init's files?

Quoted 5 lines

Some places call both daemonize() _and_ exit_files() which is redundant (checking on 2.4.19-pre7-a2):

block/loop.c :: loop_thread() usb/storage/usb.c :: usb_stor_control_thread()

Well, I have 2.4.19rc2 and 2.4.19pre1.

I took the line from loop.c :-) that's where it worked.

I found another problem: in scsi_error_handler. see drivers/scsi/scsi_error.c; I inserted exit_files(current) in line 1862.

Regards,

Phil