Alexander Viro writes:
 > 
 > 
 > On Fri, 23 Mar 2001, Danilov Nikita wrote:
 > 
 > >  > Not enough. You'll need to deal with invalidation of procfs entries on umount 
 > >  > and that will be rather painful.
 > > 
 > > What's wrong with remove_proc_entry()?
 > 
 > The fact that in can be called in the middle of read() (or write(), for that
 > matter).

Can you clarify this? I thought remove_proc_entry() takes care of this.
As an experiment I created simple stub function (follows).

If I umount fs while read is sleeping, remove_proc_entry() complains
that entry is busy, and after read completes, deletes it (the same holds
for directories).

Nikita.

int reiserfs_blackhole_in_proc( char *buffer, char **start, off_t offset,
                                int count, int *eof, void *data )
{
        extern unsigned long volatile jiffies;
        int len = 0;
        unsigned long now;

        now = jiffies;
        while( jiffies < now + 120 * HZ ) {
                schedule();
        }
        len += sprintf( &buffer[ len ], "Thank you for your patience.\n" );
        return reiserfs_proc_tail( len, buffer, start, offset, count, eof );
}

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to