Skip to content

Commit

Permalink
[PATCH] Fix error handling in reiserfs
Browse files Browse the repository at this point in the history
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: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Aug 14, 2005
1 parent f73bc8c commit 1b0a74d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/reiserfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1b0a74d

Please sign in to comment.