Re: [PATCH 5/9 next] scsi: Use iovec_import() instead of import_iovec().

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

 



So looking at the various callers I'm not sure this API is the
best.  If we want to do something fancy I'd hide the struct iovec
instances entirely with something like:

struct iov_storage {
	struct iovec stack[UIO_FASTIOV], *vec;
}

int iov_iter_import_iovec(struct iov_iter *iter, struct iov_storage *s,
		const struct iovec __user *vec, unsigned long nr_segs,
		int type);

and then add a new helper to free the thing if needed:

void iov_iter_release_iovec(struct iov_storage *s)
{
	if (s->vec != s->stack)
		kfree(s->vec);
}



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux