Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/external/cddl/osnet/dist/uts/common/fs/zfs Pull up follow...
details: https://anonhg.NetBSD.org/src/rev/a88fa79d0f3e
branches: netbsd-9
changeset: 1000951:a88fa79d0f3e
user: martin <martin%NetBSD.org@localhost>
date: Sun Oct 06 11:18:01 2019 +0000
description:
Pull up following revision(s) (requested by brad in ticket #289):
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.53
For ZFS on NetBSD there are a number of functions called
zfs_netbsd_{create,mknod,link,etc..} that call functions called
zfs_{create,mknod,link,etc..}. These later functions may return a
error code along with a *vpp that is NULL. This situation was not
handled by the zfs_netbsd_* functions and would result in a panic in a
number of cases. The simplest to trigger it was filling up a dataset
or pool resulting in a over quota condition. An attempt to create
another file, or directory at that point would panic.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r faa5cdddcff3 -r a88fa79d0f3e external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Sun Oct 06 11:13:35 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Sun Oct 06 11:18:01 2019 +0000
@@ -5318,7 +5318,8 @@
KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
if (error == 0)
VN_KNOTE(dvp, NOTE_WRITE);
- VOP_UNLOCK(*vpp, 0);
+ if (*vpp != NULL)
+ VOP_UNLOCK(*vpp, 0);
return (error);
}
@@ -5358,7 +5359,8 @@
KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
if (error == 0)
VN_KNOTE(dvp, NOTE_WRITE);
- VOP_UNLOCK(*vpp, 0);
+ if (*vpp != NULL)
+ VOP_UNLOCK(*vpp, 0);
return (error);
}
@@ -5428,7 +5430,8 @@
KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
if (error == 0)
VN_KNOTE(dvp, NOTE_WRITE | NOTE_LINK);
- VOP_UNLOCK(*vpp, 0);
+ if (*vpp != NULL)
+ VOP_UNLOCK(*vpp, 0);
return (error);
}
@@ -5717,7 +5720,8 @@
VN_KNOTE(ap->a_dvp, NOTE_WRITE);
KASSERT((error == 0) == (*vpp != NULL));
KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
- VOP_UNLOCK(*vpp, 0);
+ if (*vpp != NULL)
+ VOP_UNLOCK(*vpp, 0);
return (error);
}
Home |
Main Index |
Thread Index |
Old Index