Re: 2.6.0-test6 crash while reading files in /proc/fs/reiserfs/sda1

Nikita Danilov
2003-10-02T15:40:55Z

viro@parcelfarce.linux.theplanet.co.uk writes:
> [Linus, please wait with applying the patch below until ACK from Nikita, OK?]
>

[...]

>
>
> If you are OK with the patch below - please ACK it. AFAICS it's the minimal
> fix and combined with optimistic sget() patch it should address all objections.

Yes, it works (cum optimistic sget()).

>
> diff -urN B6-rest/fs/reiserfs/procfs.c B6-current/fs/reiserfs/procfs.c
> --- B6-rest/fs/reiserfs/procfs.c Sat Sep 27 22:04:57 2003
> +++ B6-current/fs/reiserfs/procfs.c Thu Oct 2 07:57:31 2003
> @@ -478,14 +478,15 @@
> static void *r_next(struct seq_file *m, void *v, loff_t *pos)
> {
> ++*pos;
> + if (v)
> + deactivate_super(v);
> return NULL;
> }
>
> static void r_stop(struct seq_file *m, void *v)
> {
> - struct proc_dir_entry *de = m->private;
> - struct super_block *s = de->data;
> - deactivate_super(s);
> + if (v)
> + deactivate_super(v);
> }
>
> static int r_show(struct seq_file *m, void *v)

Nikita.