diff options
| author | Don Lewis <truckman@FreeBSD.org> | 2005-09-11 19:06:50 +0000 |
|---|---|---|
| committer | Don Lewis <truckman@FreeBSD.org> | 2005-09-11 19:06:50 +0000 |
| commit | 6cfe78e1fcdaf7dfbfc40735bd783d7158288c9e (patch) | |
| tree | 6098b67ec99da3252324f116d9a334a5269a760e /sys/gnu | |
| parent | 0a5194d50f3588be992b9f0c3a461ee38d4b9361 (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 \ |
