diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-13 08:49:40 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-13 13:30:53 +0100 |
commit | 7f62656be8a8ef14c168db2d98021fb9c8cc1076 (patch) | |
tree | 5377034782018dbac0aebb95a1f7e106ca7b6841 /fs/aio.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next (diff) | |
download | linux-7f62656be8a8ef14c168db2d98021fb9c8cc1076.tar.xz linux-7f62656be8a8ef14c168db2d98021fb9c8cc1076.zip |
aio: checking for NULL instead of IS_ERR
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>
Diffstat (limited to '')
-rw-r--r-- | fs/aio.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -163,8 +163,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; |