diff options
Diffstat (limited to 'lib/libufs/cgroup.c')
-rw-r--r-- | lib/libufs/cgroup.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libufs/cgroup.c b/lib/libufs/cgroup.c index 90b28eadad2c..7c7ca0d242b4 100644 --- a/lib/libufs/cgroup.c +++ b/lib/libufs/cgroup.c @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2003 Juli Mallett. All rights reserved. * @@ -27,9 +27,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/param.h> #include <sys/mount.h> #include <sys/disklabel.h> @@ -268,6 +265,10 @@ cgwrite1(struct uufsd *disk, int cg) static char errmsg[BUFSIZ]; if (cg == disk->d_cg.cg_cgx) { + if (ufs_disk_write(disk) == -1) { + ERROR(disk, "failed to open disk for writing"); + return (-1); + } if (cgput(disk->d_fd, &disk->d_fs, &disk->d_cg) == 0) return (0); ERROR(disk, NULL); |