Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1341036

Re: [PATCH] ubifs: Implement O_TMPFILE

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject Re: [PATCH] ubifs: Implement O_TMPFILE
Date 2016-02-23 22:20 +0100
Message-ID <r5sxc-2Gj-9@gated-at.bofh.it> (permalink)
References <r4GCf-1rJ-27@gated-at.bofh.it> <r5s4a-2dy-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] ubifs: Implement O_TMPFILE Pavel Machek <pavel@ucw.cz> - 2016-02-23 21:50 +0100
  Re: [PATCH] ubifs: Implement O_TMPFILE Richard Weinberger <richard@nod.at> - 2016-02-23 22:20 +0100

csiph-web