From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755436AbcBWVPW (ORCPT ); Tue, 23 Feb 2016 16:15:22 -0500 Received: from a.ns.miles-group.at ([95.130.255.143]:11949 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755328AbcBWVPV (ORCPT ); Tue, 23 Feb 2016 16:15:21 -0500 Subject: Re: [PATCH] ubifs: Implement O_TMPFILE To: Pavel Machek References: <1456048004-20365-1-git-send-email-richard@nod.at> <20160223204510.GA16961@amd> Cc: linux-mtd@lists.infradead.org, dedekind1@gmail.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org From: Richard Weinberger Message-ID: <56CCCBE4.1040809@nod.at> Date: Tue, 23 Feb 2016 22:15:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160223204510.GA16961@amd> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 23.02.2016 um 21:45 schrieb Pavel Machek: > Hi! > >> + ui = ubifs_inode(inode); >> + >> + err = ubifs_init_security(dir, inode, &dentry->d_name); >> + if (err) >> + goto out_inode; >> + >> + mutex_lock(&ui->ui_mutex); >> + insert_inode_hash(inode); >> + d_tmpfile(dentry, inode); >> + ubifs_assert(ui->dirty); >> + instantiated = 1; >> + mutex_unlock(&ui->ui_mutex); >> + >> + mutex_lock(&dir_ui->ui_mutex); >> + err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 1, 0); >> + if (err) >> + goto out_cancel; >> + mutex_unlock(&dir_ui->ui_mutex); > > Move the if () below unlock, and make it goto out_inode? Yes. That's better. :) Thanks, //richard