tech-kern archive

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

Re: [PATCH] PUFFS backend allocation (round 3)



Antti Kantee <pooka%iki.fi@localhost> wrote:

> That comment is close to 10 years old.  If you haven't, start by 
> checking that it still applies and perhaps do a quick check to see what
> goes wrong (I don't remember exactly, some sort of kernel panic I think)
> and if it can be fixed.

I just tried removing this if (error != ENOMEM) error = 0 and it seems
work  fine on netbsd-7. The error is reported to the calling layers
without a hitch.

Are there some corner cases where it could cause problem?
And why does NF has to save the error in np->n_error to recover it in
upper layer? Obsolete code that was never touched?

Index: sys/fs/puffs/puffs_vnops.c
===================================================================
RCS file: /cvsroot/src/sys/fs/puffs/puffs_vnops.c,v
retrieving revision 1.182.2.7
diff -U 4 -r1.182.2.7 puffs_vnops.c
--- sys/fs/puffs/puffs_vnops.c.orig
+++ sys/fs/puffs/puffs_vnops.c
 
                if (dobiodone == 0)
                        goto out;
 
-               /*
-                * XXXXXXXX: wrong, but kernel can't survive strategy
-                * failure currently.  Here, have one more X: X.
-                */
-               if (error != ENOMEM)
-                       error = 0;
-
                error = checkerr(pmp, error, __func__);
                if (error)
                        goto out;
 

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index