Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-localcount]: src/sys/ufs/ffs Actually save the bdev value when ...
details: https://anonhg.NetBSD.org/src/rev/a52c59bf4bc3
branches: pgoyette-localcount
changeset: 852830:a52c59bf4bc3
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu Jul 21 10:37:09 2016 +0000
description:
Actually save the bdev value when it is retrieved, so we can use it
later in a call to bdevsw_release().
diffstat:
sys/ufs/ffs/ffs_vfsops.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 453e9e374f2e -r a52c59bf4bc3 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Thu Jul 21 10:34:11 2016 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Thu Jul 21 10:37:09 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.339.2.1 2016/07/20 23:47:57 pgoyette Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.339.2.2 2016/07/21 10:37:09 pgoyette Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.339.2.1 2016/07/20 23:47:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.339.2.2 2016/07/21 10:37:09 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -452,10 +452,13 @@
if (devvp->v_type != VBLK) {
DPRINTF("non block device %d", devvp->v_type);
error = ENOTBLK;
- } else if (bdevsw_lookup_acquire(devvp->v_rdev) == NULL) {
- DPRINTF("can't find block device 0x%jx",
- devvp->v_rdev);
- error = ENXIO;
+ } else {
+ bdev = bdevsw_lookup_acquire(devvp->v_rdev);
+ if (bdev == NULL) {
+ DPRINTF("can't find block device 0x%jx",
+ devvp->v_rdev);
+ error = ENXIO;
+ }
}
} else {
/*
Home |
Main Index |
Thread Index |
Old Index