diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-01-23 19:57:10 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-01-28 16:40:37 -0500 |
commit | abd30bb0af9d4671506502278e8631bed9e3c35c (patch) | |
tree | 73e00f8712c8e4460647dd889cc32503fb56c21b /fs | |
parent | 3612b49598c303cfb22a4b609427f829828e2427 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 04b4fb9144a..12dabe28cf5 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -2085,7 +2085,7 @@ static long btrfs_ioctl_trans_start(struct file *file) | |||
2085 | 2085 | ||
2086 | ret = -ENOMEM; | 2086 | ret = -ENOMEM; |
2087 | trans = btrfs_start_ioctl_transaction(root, 0); | 2087 | trans = btrfs_start_ioctl_transaction(root, 0); |
2088 | if (!trans) | 2088 | if (IS_ERR(trans)) |
2089 | goto out_drop; | 2089 | goto out_drop; |
2090 | 2090 | ||
2091 | file->private_data = trans; | 2091 | file->private_data = trans; |