Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs If the config is ...
details: https://anonhg.NetBSD.org/src/rev/0cb0d47e27c8
branches: trunk
changeset: 763084:0cb0d47e27c8
user: riz <riz%NetBSD.org@localhost>
date: Wed Mar 09 23:49:06 2011 +0000
description:
If the config is zero size, don't try to read it.
OK haad@
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/spa_config.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r b06b38f76db7 -r 0cb0d47e27c8 external/cddl/osnet/dist/uts/common/fs/zfs/spa_config.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/spa_config.c Wed Mar 09 23:41:24 2011 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/spa_config.c Wed Mar 09 23:49:06 2011 +0000
@@ -95,6 +95,9 @@
if (kobj_get_filesize(file, &fsize) != 0)
goto out;
+ if (fsize == 0)
+ goto out;
+
buf = kmem_alloc(fsize, KM_SLEEP);
/*
Home |
Main Index |
Thread Index |
Old Index