[PATCH] ubifs: Implement O_TMPFILE

Pavel Machek pavel at ucw.cz
Tue Feb 23 12:45:11 PST 2016


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



More information about the linux-mtd mailing list