Re: [PATCH 3/7] revoke: core code

From: Pekka J Enberg
Date: Fri Mar 09 2007 - 06:43:27 EST


On Fri, 9 Mar 2007 10:15:15 +0200 (EET)
Pekka J Enberg <penberg@xxxxxxxxxxxxxx> wrote:
> > +static ssize_t revoked_file_aio_read(struct kiocb *iocb,
> > + const struct iovec *iov,
> > + unsigned long nr_segs, loff_t pos)
> > +{
> > + return -EBADF;
> > +}

On Fri, 9 Mar 2007, Alan Cox wrote:
> Do we need both -EBADF and -EXNIO versions. It is hard to tell from
> existing OS's as they don't support revoke of files just special files ?

No, we don't. We should always do EBADF except for close(2) which is zero
always and make read(2) zero for special files.

On Fri, 9 Mar 2007 10:15:15 +0200 (EET)
Pekka J Enberg <penberg@xxxxxxxxxxxxxx> wrote:
> > +static ssize_t revoked_special_file_read(struct file *filp, char __user * buf,
> > + size_t size, loff_t * ppos)
> > +{
> > + return -ENXIO;
> > +}

On Fri, 9 Mar 2007, Alan Cox wrote:
> Bezerkly Unix returns 0 for the special file read case

Aah, I'll fix that up. Thanks.

Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/