aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2003-08-28 00:56:39 +0000
committerJeff Roberson <jeff@FreeBSD.org>2003-08-28 00:56:39 +0000
commit7637e5854b536909bfd90051afb050d8b491b432 (patch)
treedcfa0ef48d8184df0bc20ac32796bc4eb99dfdcb
parent7abc12de034f02ea3803714bfa890a24e434bcf3 (diff)
downloadsrc-7637e5854b536909bfd90051afb050d8b491b432.tar.gz
src-7637e5854b536909bfd90051afb050d8b491b432.zip
- Clean-up comments that refer to the use of B_LOCKED.
Notes
Notes: svn path=/head/; revision=119513
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c1
-rw-r--r--sys/gnu/ext2fs/fs.h6
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c1
-rw-r--r--sys/gnu/fs/ext2fs/fs.h6
4 files changed, 8 insertions, 6 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index b5369f4e4840..a51d393fcc37 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -488,7 +488,6 @@ static int compute_sb_data(devvp, es, fs)
printf("EXT2-fs: unable to read group descriptors (%d)\n", error);
return EIO;
}
- /* Set the B_LOCKED flag on the buffer, then brelse() it */
LCK_BUF(fs->s_group_desc[i])
}
if(!ext2_check_descriptors(fs)) {
diff --git a/sys/gnu/ext2fs/fs.h b/sys/gnu/ext2fs/fs.h
index c54f979eea2d..a14f28c36eb1 100644
--- a/sys/gnu/ext2fs/fs.h
+++ b/sys/gnu/ext2fs/fs.h
@@ -153,8 +153,10 @@ extern u_char *fragtbl[];
#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curthread)
/*
- * To lock a buffer, set the B_LOCKED flag and then brelse() it. To unlock,
- * reset the B_LOCKED flag and brelse() the buffer back on the LRU list
+ * 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.
*/
#define LCK_BUF(bp) BUF_KERNPROC(bp);
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index b5369f4e4840..a51d393fcc37 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -488,7 +488,6 @@ static int compute_sb_data(devvp, es, fs)
printf("EXT2-fs: unable to read group descriptors (%d)\n", error);
return EIO;
}
- /* Set the B_LOCKED flag on the buffer, then brelse() it */
LCK_BUF(fs->s_group_desc[i])
}
if(!ext2_check_descriptors(fs)) {
diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h
index c54f979eea2d..a14f28c36eb1 100644
--- a/sys/gnu/fs/ext2fs/fs.h
+++ b/sys/gnu/fs/ext2fs/fs.h
@@ -153,8 +153,10 @@ extern u_char *fragtbl[];
#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curthread)
/*
- * To lock a buffer, set the B_LOCKED flag and then brelse() it. To unlock,
- * reset the B_LOCKED flag and brelse() the buffer back on the LRU list
+ * 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.
*/
#define LCK_BUF(bp) BUF_KERNPROC(bp);