Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f62656b authored by Dan Carpenter's avatar Dan Carpenter Committed by Al Viro
Browse files

aio: checking for NULL instead of IS_ERR



alloc_anon_inode() returns an ERR_PTR(), it doesn't return NULL.

Fixes: 71ad7490 ('rework aio migrate pages to use aio fs')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 42a2d923
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;