From fa4a02b45a3299062aa32ff6ed8e099b5ee26f6a Mon Sep 17 00:00:00 2001 From: jdolecek Date: Sat, 20 Aug 2016 19:53:43 +0000 Subject: [PATCH] modify the comment to note code needs to brele() to have a shot on actually working --- sys/ufs/ext2fs/ext2fs_alloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/ufs/ext2fs/ext2fs_alloc.c b/sys/ufs/ext2fs/ext2fs_alloc.c index 348116cbdf4d..eb07076820f7 100644 --- a/sys/ufs/ext2fs/ext2fs_alloc.c +++ b/sys/ufs/ext2fs/ext2fs_alloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_alloc.c,v 1.50 2016/08/20 19:51:50 jdolecek Exp $ */ +/* $NetBSD: ext2fs_alloc.c,v 1.51 2016/08/20 19:53:43 jdolecek Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ext2fs_alloc.c,v 1.50 2016/08/20 19:51:50 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_alloc.c,v 1.51 2016/08/20 19:53:43 jdolecek Exp $"); #include #include @@ -418,7 +418,10 @@ ext2fs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) bno = ext2fs_mapsearch(fs, bbp, bpref); #if 0 - /* XXX jdolecek mapsearch actually never fails, it panics instead */ + /* + * XXX jdolecek mapsearch actually never fails, it panics instead. + * If re-enabling, make sure to brele() before returning. + */ if (bno < 0) return 0; #endif