summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTsutomu Itoh2011-01-24 01:57:10 +0100
committerChris Mason2011-01-28 22:40:37 +0100
commitabd30bb0af9d4671506502278e8631bed9e3c35c (patch)
tree73e00f8712c8e4460647dd889cc32503fb56c21b
parentbtrfs: fix return value check of btrfs_join_transaction() (diff)
downloadkernel-qcow2-linux-abd30bb0af9d4671506502278e8631bed9e3c35c.tar.gz
kernel-qcow2-linux-abd30bb0af9d4671506502278e8631bed9e3c35c.tar.xz
kernel-qcow2-linux-abd30bb0af9d4671506502278e8631bed9e3c35c.zip
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>
-rw-r--r--fs/btrfs/ioctl.c2
1 files changed, 1 insertions, 1 deletions
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;