if (retval >= 0 && !is_sync_kiocb(iocb)) 
if (retval > 0 && !is_sync_kiocb(iocb)) 
__generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,		unsigned long nr_segs, loff_t *ppos){	struct file *filp = iocb->ki_filp;	ssize_t retval;	unsigned long seg;	size_t count;	count = 0;	for (seg = 0; seg < nr_segs; seg++) {		const struct iovec *iv = &iov[seg];		/*		 * If any segment has a negative length, or the cumulative		 * length ever wraps negative then return -EINVAL.		 */		count += iv->iov_len;		if (unlikely((ssize_t)(count|iv->iov_len) < 0))			return -EINVAL;		if (access_ok(VERIFY_WRITE, iv->iov_base, iv->iov_len))			continue;		if (seg == 0)			return -EFAULT;		nr_segs = seg;		count -= iv->iov_len;	/* This segment is no good */		break;	}	/* coalesce the iovecs and go direct-to-BIO for O_DIRECT */	if (filp->f_flags & O_DIRECT) {		loff_t pos = *ppos, size;		struct address_space *mapping;		struct inode *inode;		mapping = filp->f_mapping;		inode = mapping->host;		retval = 0;		if (!count)			goto out; /* skip atime */		size = i_size_read(inode);		if (pos < size) {			retval = generic_file_direct_IO(READ, iocb,						iov, pos, nr_segs);			if (retval >= 0 && !is_sync_kiocb(iocb))				retval = -EIOCBQUEUED;			if (retval > 0)				*ppos = pos + retval;		}		file_accessed(filp);		goto out;	}	retval = 0;	if (count) {		for (seg = 0; seg < nr_segs; seg++) {			read_descriptor_t desc;			desc.written = 0;			desc.arg.buf = iov[seg].iov_base;			desc.count = iov[seg].iov_len;			if (desc.count == 0)				continue;			desc.error = 0;			do_generic_file_read(filp,ppos,&desc,file_read_actor);			retval += desc.written;			if (!retval) {				retval = desc.error;				break;			}		}	}out:	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b5c44c2147a447f77e07fecdb087ae288e1f4e40/filemap.c/buggy/mm/filemap.c