diff options
author | jeff <jeff@FreeBSD.org> | 2013-05-31 00:43:41 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2013-05-31 00:43:41 +0000 |
commit | d7efebc4db8c1b875c915fb1a2759cb9df4f2956 (patch) | |
tree | 47c74a9a8f1d3fbea9e54f402b3cf363e92546a4 /sys/fs/nandfs/nandfs_segment.c | |
parent | 7c988b2ec361d43cc84f05e89080a923a7101a76 (diff) | |
download | FreeBSD-src-d7efebc4db8c1b875c915fb1a2759cb9df4f2956.zip FreeBSD-src-d7efebc4db8c1b875c915fb1a2759cb9df4f2956.tar.gz |
- Convert the bufobj lock to rwlock.
- Use a shared bufobj lock in getblk() and inmem().
- Convert softdep's lk to rwlock to match the bufobj lock.
- Move INFREECNT to b_flags and protect it with the buf lock.
- Remove unnecessary locking around bremfree() and BKGRDINPROG.
Sponsored by: EMC / Isilon Storage Division
Discussed with: mckusick, kib, mdf
Diffstat (limited to 'sys/fs/nandfs/nandfs_segment.c')
-rw-r--r-- | sys/fs/nandfs/nandfs_segment.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/nandfs/nandfs_segment.c b/sys/fs/nandfs/nandfs_segment.c index 7433e77..8b1dc41 100644 --- a/sys/fs/nandfs/nandfs_segment.c +++ b/sys/fs/nandfs/nandfs_segment.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mount.h> #include <sys/mutex.h> #include <sys/namei.h> +#include <sys/rwlock.h> #include <sys/sysctl.h> #include <sys/vnode.h> #include <sys/buf.h> @@ -702,7 +703,7 @@ nandfs_save_buf(struct buf *bp, uint64_t blocknr, struct nandfs_device *fsdev) if (bp->b_bufobj != bo) { BO_LOCK(bp->b_bufobj); BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, - BO_MTX(bp->b_bufobj)); + BO_LOCKPTR(bp->b_bufobj)); KASSERT(BUF_ISLOCKED(bp), ("Problem with locking buffer")); } |