Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b0a74d1 authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds
Browse files

[PATCH] Fix error handling in reiserfs



Initialize key object ID in inode so that we don't try to remove the inode
when we fail on some checks even before we manage to allocate something.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f73bc8ca
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -593,6 +593,9 @@ static int new_inode_init(struct inode *inode, struct inode *dir, int mode)
	 */
	inode->i_uid = current->fsuid;
	inode->i_mode = mode;
	/* Make inode invalid - just in case we are going to drop it before
	 * the initialization happens */
	INODE_PKEY(inode)->k_objectid = 0;

	if (dir->i_mode & S_ISGID) {
		inode->i_gid = dir->i_gid;