Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc fixes from Al Viro: "A few regression fixes from this cycle" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: aio: use kmem_cache_free() instead of kfree() iov_iter: Fix build error without CONFIG_CRYPTO aio: Fix an error code in __io_submit_one()
This commit is contained in:
commit
972acfb494
4
fs/aio.c
4
fs/aio.c
|
@ -1034,7 +1034,7 @@ static inline struct aio_kiocb *aio_get_req(struct kioctx *ctx)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (unlikely(!get_reqs_available(ctx))) {
|
if (unlikely(!get_reqs_available(ctx))) {
|
||||||
kfree(req);
|
kmem_cache_free(kiocb_cachep, req);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1794,7 +1794,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb,
|
||||||
*/
|
*/
|
||||||
eventfd = eventfd_ctx_fdget(iocb->aio_resfd);
|
eventfd = eventfd_ctx_fdget(iocb->aio_resfd);
|
||||||
if (IS_ERR(eventfd))
|
if (IS_ERR(eventfd))
|
||||||
return PTR_ERR(req->ki_eventfd);
|
return PTR_ERR(eventfd);
|
||||||
|
|
||||||
req->ki_eventfd = eventfd;
|
req->ki_eventfd = eventfd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1528,6 +1528,7 @@ EXPORT_SYMBOL(csum_and_copy_to_iter);
|
||||||
size_t hash_and_copy_to_iter(const void *addr, size_t bytes, void *hashp,
|
size_t hash_and_copy_to_iter(const void *addr, size_t bytes, void *hashp,
|
||||||
struct iov_iter *i)
|
struct iov_iter *i)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_CRYPTO
|
||||||
struct ahash_request *hash = hashp;
|
struct ahash_request *hash = hashp;
|
||||||
struct scatterlist sg;
|
struct scatterlist sg;
|
||||||
size_t copied;
|
size_t copied;
|
||||||
|
@ -1537,6 +1538,9 @@ size_t hash_and_copy_to_iter(const void *addr, size_t bytes, void *hashp,
|
||||||
ahash_request_set_crypt(hash, &sg, NULL, copied);
|
ahash_request_set_crypt(hash, &sg, NULL, copied);
|
||||||
crypto_ahash_update(hash);
|
crypto_ahash_update(hash);
|
||||||
return copied;
|
return copied;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(hash_and_copy_to_iter);
|
EXPORT_SYMBOL(hash_and_copy_to_iter);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue