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

Commit abd30bb0 authored by Tsutomu Itoh's avatar Tsutomu Itoh Committed by Chris Mason
Browse files

btrfs: check return value of btrfs_start_ioctl_transaction() properly



btrfs_start_ioctl_transaction() returns ERR_PTR(), not NULL.
So, it is necessary to use IS_ERR() to check the return value.

Signed-off-by: default avatarTsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 3612b495
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2085,7 +2085,7 @@ static long btrfs_ioctl_trans_start(struct file *file)


	ret = -ENOMEM;
	ret = -ENOMEM;
	trans = btrfs_start_ioctl_transaction(root, 0);
	trans = btrfs_start_ioctl_transaction(root, 0);
	if (!trans)
	if (IS_ERR(trans))
		goto out_drop;
		goto out_drop;


	file->private_data = trans;
	file->private_data = trans;