btrfs: check return value of btrfs_start_ioctl_transaction() properly
diff mbox

Message ID 4D3CCE66.5000008@jp.fujitsu.com
State New, archived
Headers show

Commit Message

Tsutomu Itoh Jan. 24, 2011, 12:57 a.m. UTC
None

Patch
diff mbox

diff -urNp linux-2.6.38-rc1/fs/btrfs/ioctl.c linux-2.6.38-rc1.new/fs/btrfs/ioctl.c
--- linux-2.6.38-rc1/fs/btrfs/ioctl.c	2011-01-19 08:14:02.000000000 +0900
+++ linux-2.6.38-rc1.new/fs/btrfs/ioctl.c	2011-01-24 09:27:12.000000000 +0900
@@ -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;