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


Groups > linux.kernel > #1341019

Re: [PATCH] ubifs: Implement O_TMPFILE

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [PATCH] ubifs: Implement O_TMPFILE
Date 2016-02-23 21:50 +0100
Message-ID <r5s4a-2dy-19@gated-at.bofh.it> (permalink)
References <r4GCf-1rJ-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext 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