On Sun, Oct 14, 2001 at 06:54:12PM -0400, Chris Mason wrote:
> On Monday, October 15, 2001 12:35:01 AM +0200 Erik Tews <[EMAIL PROTECTED]>
> wrote:
> > I saw that there is a reiserfs-fix in 2.4.12-ac2. What kind of bug is
> > that? I did not notice anybody here talking about a buffer-problem.
> This is a bug that Vladimir found. In the pure linus kernel, this code
> works (non reiserfs specific).
>
> lock_buffer(bh) ;
> bh->b_end_io = end_buffer_io_async ;
> submit_bh(bh) ;
>
> In alan's kernel, end_buffer_io_async does a put_bh on the buffer head,
> leading to errors about brelsing buffers already free, and general
> corruption if you don't get_bh(bh) before calling submit_bh. Linus kernels
> used to work this way too, but the change hasn't been merged into -ac yet.
>
> Anyway, somewhere during 2.4.10-ac we merged a change that used the linus
> style async end io handlers, there were a few reports over the last few
> weeks.
I now had a closer look at the source. Was it only this one line?
@@ -1809,6 +1818,7 @@
for(i = 0 ; i < nr ; i++) {
bh = bhp[i] ;
lock_buffer(bh) ;
+ get_bh(bh) ;
set_buffer_async_io(bh) ;
/* submit_bh doesn't care if the buffer is dirty, but nobody
** later on in the call chain will be cleaning it. So, we
I now took this part of the 2.4.12-ac2 patch and applied it to 2.4.10-ac10 to
have a kernel which has got working quota-support and does not mix up the
filesystem.