Messages in this thread | | | Date | Fri, 9 Apr 1999 20:49:50 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: [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/
| |