Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/prg-localcount2]: src/sys/ufs/ext2fs Adapt for bdevsw_lookup_acquire()
details: https://anonhg.NetBSD.org/src/rev/f9a1fc010c5f
branches: prg-localcount2
changeset: 823552:f9a1fc010c5f
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed May 17 04:08:36 2017 +0000
description:
Adapt for bdevsw_lookup_acquire()
diffstat:
sys/ufs/ext2fs/ext2fs_vfsops.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 5bfb6577237d -r f9a1fc010c5f sys/ufs/ext2fs/ext2fs_vfsops.c
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c Wed May 17 03:54:20 2017 +0000
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c Wed May 17 04:08:36 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.208 2017/04/17 08:32:01 hannken Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.208.2.1 2017/05/17 04:08:36 pgoyette Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.208 2017/04/17 08:32:01 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.208.2.1 2017/05/17 04:08:36 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -301,6 +301,7 @@
int
ext2fs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
{
+ const struct bdevsw devsw;
struct lwp *l = curlwp;
struct vnode *devvp;
struct ufs_args *args = data;
@@ -342,8 +343,13 @@
*/
if (devvp->v_type != VBLK)
error = ENOTBLK;
- else if (bdevsw_lookup(devvp->v_rdev) == NULL)
- error = ENXIO;
+ else {
+ devsw = bdevsw_lookup_acquire(devvp->v_rdev);
+ if (devsw == NULL)
+ error = ENXIO;
+ else
+ bdevsw_release(devsw);
+ }
} else {
/*
* Be sure we're still naming the same device
Home |
Main Index |
Thread Index |
Old Index