From patchwork Mon Jan 24 00:57:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsutomu Itoh X-Patchwork-Id: 499571 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0O0w0it025730 for ; Mon, 24 Jan 2011 00:58:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752780Ab1AXA5w (ORCPT ); Sun, 23 Jan 2011 19:57:52 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:36984 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750Ab1AXA5v (ORCPT ); Sun, 23 Jan 2011 19:57:51 -0500 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 268133EE0BC for ; Mon, 24 Jan 2011 09:57:50 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id E05A745DE5A for ; Mon, 24 Jan 2011 09:57:49 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id C6ADA45DE58 for ; Mon, 24 Jan 2011 09:57:49 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id BA050E78001 for ; Mon, 24 Jan 2011 09:57:49 +0900 (JST) Received: from ml13.s.css.fujitsu.com (ml13.s.css.fujitsu.com [10.249.87.103]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 858F4E08002 for ; Mon, 24 Jan 2011 09:57:49 +0900 (JST) Received: from ml13.css.fujitsu.com (ml13 [127.0.0.1]) by ml13.s.css.fujitsu.com (Postfix) with ESMTP id 57836FD0007; Mon, 24 Jan 2011 09:57:49 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.101.86]) by ml13.s.css.fujitsu.com (Postfix) with ESMTP id EB9D4FD0005; Mon, 24 Jan 2011 09:57:48 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.4.0 Received: from T-ITOH1[10.124.101.86] by T-ITOH1 (FujitsuOutboundMailChecker v1.4.0/9992[10.124.101.86]); Mon, 24 Jan 2011 09:57:34 +0900 (JST) Message-ID: <4D3CCE66.5000008@jp.fujitsu.com> Date: Mon, 24 Jan 2011 09:57:10 +0900 From: Tsutomu Itoh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Linux Btrfs CC: Chris Mason Subject: [PATCH] btrfs: check return value of btrfs_start_ioctl_transaction() properly Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 24 Jan 2011 00:58:23 +0000 (UTC) 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;