Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ufs Add comment that getblk() in ufs_bmaparray() ret...



details:   https://anonhg.NetBSD.org/src/rev/132232b73478
branches:  trunk
changeset: 526808:132232b73478
user:      enami <enami%NetBSD.org@localhost>
date:      Sat May 11 12:23:53 2002 +0000

description:
Add comment that getblk() in ufs_bmaparray() returns an error only if
we are pagedaemon.

diffstat:

 sys/ufs/ufs/ufs_bmap.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r afd33902bc9d -r 132232b73478 sys/ufs/ufs/ufs_bmap.c
--- a/sys/ufs/ufs/ufs_bmap.c    Sat May 11 11:57:14 2002 +0000
+++ b/sys/ufs/ufs/ufs_bmap.c    Sat May 11 12:23:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_bmap.c,v 1.16 2001/11/13 06:23:17 chs Exp $        */
+/*     $NetBSD: ufs_bmap.c,v 1.17 2002/05/11 12:23:53 enami Exp $      */
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.16 2001/11/13 06:23:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.17 2002/05/11 12:23:53 enami Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -189,7 +189,14 @@
                xap->in_exists = 1;
                bp = getblk(vp, metalbn, mp->mnt_stat.f_iosize, 0, 0);
                if (bp == NULL) {
-                       return ENOMEM;
+
+                       /*
+                        * getblk() above returns NULL only iff we are
+                        * pagedaemon.  See the implementation of getblk
+                        * for detail.
+                        */
+
+                       return (ENOMEM);
                }
                if (bp->b_flags & (B_DONE | B_DELWRI)) {
                        trace(TR_BREADHIT, pack(vp, size), metalbn);



Home | Main Index | Thread Index | Old Index