diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-13 10:49:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-08 07:29:16 -0800 |
commit | 603f89ac73b7f286d3fdbc26db0ada25b06bd333 (patch) | |
tree | 791f2b2b85e891fd2b3684344b9b3fbde12cc8cf /fs | |
parent | 79b5389c84a342525b7cd1624251444a10518b95 (diff) | |
download | linux-rt-603f89ac73b7f286d3fdbc26db0ada25b06bd333.tar.gz |
aio: checking for NULL instead of IS_ERR
commit 7f62656be8a8ef14c168db2d98021fb9c8cc1076 upstream.
alloc_anon_inode() returns an ERR_PTR(), it doesn't return NULL.
Fixes: 71ad7490c1f3 ('rework aio migrate pages to use aio fs')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -164,8 +164,8 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) struct file *file; struct path path; struct inode *inode = alloc_anon_inode(aio_mnt->mnt_sb); - if (!inode) - return ERR_PTR(-ENOMEM); + if (IS_ERR(inode)) + return ERR_CAST(inode); inode->i_mapping->a_ops = &aio_ctx_aops; inode->i_mapping->private_data = ctx; |