btrfs: check return value of btrfs_start_ioctl_transaction() properly
PATCH 1/1 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 <[email protected]>
--- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/ioctl.c +1 -1
@@ -2082,7 +2082,7 @@ static long btrfs_ioctl_trans_start(stru ret = -ENOMEM ; trans =btrfs_start_ioctl_transaction (root,0 ); -if (!trans) +if (IS_ERR (trans)) goto out_drop; file->private_data = trans;