[PATCH] Wrong errno out of memory in open syscall

Pavel Machek pavel en suse.cz
Lun Ene 31 19:08:36 CST 2000


Hi!

> > It's a simple one line patch, below.
> > 
> > --- linux-2.3.40/fs/ext2/namei.c        Fri Jan 28 16:23:32 2000
> > +++ linux/fs/ext2/namei.c       Fri Jan 28 16:40:41 2000
> > @@ -176,7 +176,7 @@
> >                 inode = iget(dir->i_sb, ino);
> >  
> >                 if (!inode)
> > -                       return ERR_PTR(-EACCES);
> > +                       return ERR_PTR(-ENOMEM);
> >         }
> >         d_add(dentry, inode);
> >         return NULL;
> 
> ENOMEM isnt a valid return to open() except for a streams file. Quite why
> SuS  specifies this I dont know. 

Man pages with 

Linux 2.0.32            December 20, 1996                       4

on them say ENOMEM is to be expected, and it is way better than
telling people that EACCES. I think we should ignore SuS in this case.

								Pavel
-- 
I'm pavel en ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss en linmodems.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda