Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp943169yba; Fri, 26 Apr 2019 11:18:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuHSDld7SBOcHwNaU0jnsAaEl1Lfuv4HSKsZt8MAyJl3Di+9Dg0uHhtpOWM9SC1LBqlh5T X-Received: by 2002:a17:902:f094:: with SMTP id go20mr47578012plb.159.1556302739714; Fri, 26 Apr 2019 11:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556302739; cv=none; d=google.com; s=arc-20160816; b=DgczSAONTmPycud2St5WYGBwjHSIkT1whoZzgKNpfAjjoM6PS1xato5bJ6FY5tjclw 35KB8Uys/ASxHUNWNiQIHnRb7BsXklcb8tE8DIN0t9QYwXpIj0olJHzLKFYd9b9Mn+aj BbQYTLXy9ZPkwKvts/xGJL8Onn4J3uSLvSStp/5qhix7S8tfXOYv5qfICtNqDRC/iQMD HqybnkuNq4RI+L9Wvxl52Ysx9Bcp/hIbIAJVy3JkFIbdyDe4FVuPDY/364rJxF2sY1is M9bRNNvNRNM5pRQXSlevJlBcSrhrJz5asJaRlaT7ukwWNjvwHUxKIrlGe5vWAsTtvWFR vIXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MrGBVyYcXAJUXYimoyuqlFYoKGgcIHmFfttazTuK+7s=; b=llLE+/3bn7aAqS/DZQPfl9iNAe9G48ys9t/asBKhX7glNa4+GStpLhHoYNImKyW5oA uN9aipaVKFRsq5lH1uHTQ4xv7+Evccyg3xW7Dw8JQA2mlM8AzA1xXdSkl534A4S9pAcD LMG/5UhLCz9KVuIP5mTTBRLP9en9CIfsDQKOrNxfzVTGMOyDyOEF0G5NSi54sPFTGWCK ikKp8G5XQlsvNHq6nGMXH677BEXSJWlb/AMtvw5nSNGSMPQ+qO0RsnRs5IUNEUT/1nY4 gRekEzyqu2eSFdKz8N03YAY6H3ntHaQIt+i+8oObuCZWf2ms+DsFrLCPTSpVgcVVBAib l2nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si24278967pgv.163.2019.04.26.11.18.45; Fri, 26 Apr 2019 11:18:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726255AbfDZSRz (ORCPT + 99 others); Fri, 26 Apr 2019 14:17:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44248 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfDZSRz (ORCPT ); Fri, 26 Apr 2019 14:17:55 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F0FE4308A124; Fri, 26 Apr 2019 18:17:54 +0000 (UTC) Received: from bfoster (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B68C60BF3; Fri, 26 Apr 2019 18:17:54 +0000 (UTC) Date: Fri, 26 Apr 2019 14:17:52 -0400 From: Brian Foster To: "Darrick J. Wong" Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/8] xfs: unlock inode when xfs_ioctl_setattr_get_trans can't get transaction Message-ID: <20190426181749.GC34536@bfoster> References: <155552786671.20411.6442426840435740050.stgit@magnolia> <155552787973.20411.3438010430489882890.stgit@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155552787973.20411.3438010430489882890.stgit@magnolia> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 26 Apr 2019 18:17:55 +0000 (UTC) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Apr 17, 2019 at 12:04:39PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > We passed an inode into xfs_ioctl_setattr_get_trans with join_flags > indicating which locks are held on that inode. If we can't allocate a > transaction then we need to unlock the inode before we bail out. > > Signed-off-by: Darrick J. Wong > --- Reviewed-by: Brian Foster > fs/xfs/xfs_ioctl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > > diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c > index ae615a79b266..21d6f433c375 100644 > --- a/fs/xfs/xfs_ioctl.c > +++ b/fs/xfs/xfs_ioctl.c > @@ -1153,7 +1153,7 @@ xfs_ioctl_setattr_get_trans( > > error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); > if (error) > - return ERR_PTR(error); > + goto out_unlock; > > xfs_ilock(ip, XFS_ILOCK_EXCL); > xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL | join_flags); >