From patchwork Fri Sep 7 22:01:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Jansen X-Patchwork-Id: 1425271 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 32C03DF283 for ; Fri, 7 Sep 2012 22:01:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756733Ab2IGWBO (ORCPT ); Fri, 7 Sep 2012 18:01:14 -0400 Received: from ysabell.rzone.de ([81.169.144.237]:63103 "EHLO ysabell.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250Ab2IGWBN (ORCPT ); Fri, 7 Sep 2012 18:01:13 -0400 Received: from gargravarr.store (gargravarr.store [192.168.42.236]) by ysabell.rzone.de (Postfix) with ESMTP id BDF78D59; Sat, 8 Sep 2012 00:01:11 +0200 (MEST) Received: by gargravarr.store (Postfix, from userid 32466) id 4C598C008; Sat, 8 Sep 2012 00:01:11 +0200 (CEST) From: Arne Jansen To: chris.mason@fusionio.com, linux-btrfs@vger.kernel.org Cc: philipp.andreas@gmail.com Subject: [PATCH] Btrfs: btrfs_qgroup_inherit wrongly returns an error Date: Sat, 8 Sep 2012 00:01:10 +0200 Message-Id: <1347055270-12090-1-git-send-email-sensille@gmx.net> X-Mailer: git-send-email 1.7.3.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org When using the V1-version of the snap/subvol creation ioctl btrfs_qgroup_inherit wrongly returns an error because no inherit parameter is given. Fix the return value. Signed-off-by: Arne Jansen --- fs/btrfs/qgroup.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 38b42e7..090405d 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1383,10 +1383,8 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, qgroup_dirty(fs_info, srcgroup); } - if (!inherit) { - ret = -EINVAL; + if (!inherit) goto unlock; - } i_qgroups = (u64 *)(inherit + 1); for (i = 0; i < inherit->num_qgroups; ++i) {