Commit ad7999cd authored by Al Viro's avatar Al Viro

Merge branch 'fixes' into work.icache

parents 15ade5d2 f51dcd0f
...@@ -1034,7 +1034,7 @@ static inline struct aio_kiocb *aio_get_req(struct kioctx *ctx) ...@@ -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, ...@@ -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); ...@@ -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, ...@@ -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);
......
...@@ -123,17 +123,22 @@ static int aafs_show_path(struct seq_file *seq, struct dentry *dentry) ...@@ -123,17 +123,22 @@ static int aafs_show_path(struct seq_file *seq, struct dentry *dentry)
return 0; return 0;
} }
static void aafs_evict_inode(struct inode *inode) static void aafs_i_callback(struct rcu_head *head)
{ {
truncate_inode_pages_final(&inode->i_data); struct inode *inode = container_of(head, struct inode, i_rcu);
clear_inode(inode);
if (S_ISLNK(inode->i_mode)) if (S_ISLNK(inode->i_mode))
kfree(inode->i_link); kfree(inode->i_link);
free_inode_nonrcu(inode);
}
static void aafs_destroy_inode(struct inode *inode)
{
call_rcu(&inode->i_rcu, aafs_i_callback);
} }
static const struct super_operations aafs_super_ops = { static const struct super_operations aafs_super_ops = {
.statfs = simple_statfs, .statfs = simple_statfs,
.evict_inode = aafs_evict_inode, .destroy_inode = aafs_destroy_inode,
.show_path = aafs_show_path, .show_path = aafs_show_path,
}; };
......
...@@ -27,17 +27,22 @@ ...@@ -27,17 +27,22 @@
static struct vfsmount *mount; static struct vfsmount *mount;
static int mount_count; static int mount_count;
static void securityfs_evict_inode(struct inode *inode) static void securityfs_i_callback(struct rcu_head *head)
{ {
truncate_inode_pages_final(&inode->i_data); struct inode *inode = container_of(head, struct inode, i_rcu);
clear_inode(inode);
if (S_ISLNK(inode->i_mode)) if (S_ISLNK(inode->i_mode))
kfree(inode->i_link); kfree(inode->i_link);
free_inode_nonrcu(inode);
}
static void securityfs_destroy_inode(struct inode *inode)
{
call_rcu(&inode->i_rcu, securityfs_i_callback);
} }
static const struct super_operations securityfs_super_operations = { static const struct super_operations securityfs_super_operations = {
.statfs = simple_statfs, .statfs = simple_statfs,
.evict_inode = securityfs_evict_inode, .destroy_inode = securityfs_destroy_inode,
}; };
static int fill_super(struct super_block *sb, void *data, int silent) static int fill_super(struct super_block *sb, void *data, int silent)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment