mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
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 <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
3612b49598
commit
abd30bb0af
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user