Alan Cox writes:
> 
> > need to be done once, and it would not be necessary to increment the
> > refcount artificially. Could anyone with a good understanding of the fs
> > code comment on this? I would particularly like to here what Alan thinks.
> 
> The refcount is bumped otherwise you may get a race when an inode is freed
> by another user. 
> 

This brings me to a more general point I have been thinking about. As far
as I can tell from reading the task switching and interrupt code, the ELKS
kernel will only task switch on an interrupt if the current process is in
user space. This should mean that races like this are not a major threat in
ELKS is it is not possible for another process to free an inode until the
current one leaves kernel space, or sleeps. Have I got this right?

Al

Reply via email to