From: Tsutomu Itoh Date: Mon, 24 Jan 2011 00:57:10 +0000 (+0000) Subject: btrfs: check return value of btrfs_start_ioctl_transaction() properly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=abd30bb0af9d4671506502278e8631bed9e3c35c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Tsutomu Itoh Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 04b4fb9144a9..12dabe28cf54 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2085,7 +2085,7 @@ static long btrfs_ioctl_trans_start(struct file *file) ret = -ENOMEM; trans = btrfs_start_ioctl_transaction(root, 0); - if (!trans) + if (IS_ERR(trans)) goto out_drop; file->private_data = trans;