summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2013-10-10 16:48:19 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-10-15 12:14:06 -0400
commit43ae9e3fc70ca0057ae0a24ef5eedff05e3fae06 (patch)
treec90e593024fa7d4d3e7ce375e94110ef73d0a66a /fs/ext4
parent7dee8dff47734ee52da2cd8b8ea9736e42c5062f (diff)
downloadop-kernel-dev-43ae9e3fc70ca0057ae0a24ef5eedff05e3fae06.zip
op-kernel-dev-43ae9e3fc70ca0057ae0a24ef5eedff05e3fae06.tar.gz
ext[34]: fix double put in tmpfile
d_tmpfile() already swallowed the inode ref. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/namei.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 1bec5a5..5a0408d 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2319,7 +2319,7 @@ retry:
d_tmpfile(dentry, inode);
err = ext4_orphan_add(handle, inode);
if (err)
- goto err_drop_inode;
+ goto err_unlock_inode;
mark_inode_dirty(inode);
unlock_new_inode(inode);
}
@@ -2328,10 +2328,9 @@ retry:
if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries))
goto retry;
return err;
-err_drop_inode:
+err_unlock_inode:
ext4_journal_stop(handle);
unlock_new_inode(inode);
- iput(inode);
return err;
}
OpenPOWER on IntegriCloud