diff options
| author | Don Lewis <truckman@FreeBSD.org> | 2005-09-08 06:30:05 +0000 |
|---|---|---|
| committer | Don Lewis <truckman@FreeBSD.org> | 2005-09-08 06:30:05 +0000 |
| commit | d07f87a2188ca88be6d236e4a3a6c5fc2ce74a68 (patch) | |
| tree | a7c1284d2223edd7814ccb561907d21453d07e6b /sys/gnu | |
| parent | ba217ebb58acc92e736634854de9c524cefc317c (diff) | |
Notes
Diffstat (limited to 'sys/gnu')
| -rw-r--r-- | sys/gnu/fs/ext2fs/fs.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h index 033991621b49..341371d53173 100644 --- a/sys/gnu/fs/ext2fs/fs.h +++ b/sys/gnu/fs/ext2fs/fs.h @@ -150,19 +150,19 @@ extern u_char *fragtbl[]; /* * Historically, ext2fs kept it's metadata buffers on the LOCKED queue. Now, - * we simply change the lock owner to kern so that it may be released from - * another context. Later, we release the buffer, and conditionally write it - * when we're done. + * we change the lock owner to kern so that we may use it from contexts other + * than the one that originally locked it. When we are finished with the + * buffer, we release it, writing it first if it was dirty. */ -#define LCK_BUF(bp) BUF_KERNPROC(bp); +#define LCK_BUF(bp) { \ + (bp)->b_flags |= B_PERSISTENT; \ + BUF_KERNPROC(bp); \ +} #define ULCK_BUF(bp) { \ long flags; \ - int s; \ - s = splbio(); \ flags = (bp)->b_flags; \ - (bp)->b_flags &= ~(B_DIRTY); \ - splx(s); \ + (bp)->b_flags &= ~(B_DIRTY | B_PERSISTENT); \ if (flags & B_DIRTY) \ bwrite(bp); \ else \ |
