Skip to content

Commit

Permalink
btrfs: check return value of btrfs_start_ioctl_transaction() properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tsutomu Itoh authored and Chris Mason committed Jan 28, 2011
1 parent 3612b49 commit abd30bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit abd30bb

Please sign in to comment.