Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull tmpfile fix from Al Viro: "A fix for double iput() in ->tmpfile() on ext3 and ext4; I'd fucked it up, Miklos has caught it" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ext[34]: fix double put in tmpfile
This commit is contained in:
commit
0056019da4
|
@ -1783,7 +1783,7 @@ retry:
|
||||||
d_tmpfile(dentry, inode);
|
d_tmpfile(dentry, inode);
|
||||||
err = ext3_orphan_add(handle, inode);
|
err = ext3_orphan_add(handle, inode);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_drop_inode;
|
goto err_unlock_inode;
|
||||||
mark_inode_dirty(inode);
|
mark_inode_dirty(inode);
|
||||||
unlock_new_inode(inode);
|
unlock_new_inode(inode);
|
||||||
}
|
}
|
||||||
|
@ -1791,10 +1791,9 @@ retry:
|
||||||
if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
|
if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
|
||||||
goto retry;
|
goto retry;
|
||||||
return err;
|
return err;
|
||||||
err_drop_inode:
|
err_unlock_inode:
|
||||||
ext3_journal_stop(handle);
|
ext3_journal_stop(handle);
|
||||||
unlock_new_inode(inode);
|
unlock_new_inode(inode);
|
||||||
iput(inode);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2319,7 +2319,7 @@ retry:
|
||||||
d_tmpfile(dentry, inode);
|
d_tmpfile(dentry, inode);
|
||||||
err = ext4_orphan_add(handle, inode);
|
err = ext4_orphan_add(handle, inode);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_drop_inode;
|
goto err_unlock_inode;
|
||||||
mark_inode_dirty(inode);
|
mark_inode_dirty(inode);
|
||||||
unlock_new_inode(inode);
|
unlock_new_inode(inode);
|
||||||
}
|
}
|
||||||
|
@ -2328,10 +2328,9 @@ retry:
|
||||||
if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries))
|
if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries))
|
||||||
goto retry;
|
goto retry;
|
||||||
return err;
|
return err;
|
||||||
err_drop_inode:
|
err_unlock_inode:
|
||||||
ext4_journal_stop(handle);
|
ext4_journal_stop(handle);
|
||||||
unlock_new_inode(inode);
|
unlock_new_inode(inode);
|
||||||
iput(inode);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue