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


Groups > linux.kernel > #1341019 > unrolled thread

Re: [PATCH] ubifs: Implement O_TMPFILE

Started byPavel Machek <pavel@ucw.cz>
First post2016-02-23 21:50 +0100
Last post2016-02-23 22:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#1341019 — Re: [PATCH] ubifs: Implement O_TMPFILE

FromPavel Machek <pavel@ucw.cz>
Date2016-02-23 21:50 +0100
SubjectRe: [PATCH] ubifs: Implement O_TMPFILE
Message-ID<r5s4a-2dy-19@gated-at.bofh.it>
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?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [next] | [standalone]


#1341036

FromRichard Weinberger <richard@nod.at>
Date2016-02-23 22:20 +0100
Message-ID<r5sxc-2Gj-9@gated-at.bofh.it>
In reply to#1341019
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web