lkml.org 
[lkml]   [1999]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] set_blocksize() oddity.
On Fri, 9 Apr 1999, Alexander Viro wrote:

>Repeat until the complete satisfaction (nr_hashed_buffers going negative ;-/)

The bug of nr_hashed_buffers inconsistency is due where
nr_hashed_buffers++ nr_hashed_buffers-- are been placed by me. They has to
be placed in the path where pprev is != 0. It's really a minor issue
though.


struct buffer_head **pprev = bh->b_pprev;
if (pprev) {
struct buffer_head * next = bh->b_next;
if (next) {
next->b_pprev = pprev;
bh->b_next = NULL;
}
*pprev = next;
bh->b_pprev = NULL;
nr_hashed_buffers--;
}

and where b_dev is != 0:

if (bh->b_dev) {
struct buffer_head **bhp = &hash(bh->b_dev, bh->b_blocknr);
struct buffer_head *next = *bhp;

if (next) {
bh->b_next = next;
next->b_pprev = &bh->b_next;
}
*bhp = bh;
bh->b_pprev = bhp;
nr_hashed_buffers++;
}

Andrea Arcangeli




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.116 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site