Re: [PATCH] tmpfs: support aio

From: Harvey Harrison
Date: Wed May 28 2008 - 20:06:51 EST


On Wed, 2008-05-28 at 16:58 -0700, Andrew Morton wrote:
> On Thu, 29 May 2008 00:13:35 +0100 (BST)
> Hugh Dickins <hugh@xxxxxxxxxxx> wrote:
> hm. This version:
>
> static ssize_t shmem_file_aio_read(struct kiocb *iocb,
> const struct iovec *iov, unsigned long nr_segs, loff_t pos)
> {
> struct file *filp = iocb->ki_filp;
> ssize_t retval;
> unsigned long seg;
> size_t count;
> loff_t *ppos = &iocb->ki_pos;
>
> count = 0;
> retval = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
> if (retval)
> return retval;
> if (count == 0)
> return 0;
>
> retval = 0;

retval has to be 0 here, no need to assign it again?

Harvey

--
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/