aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2005-08-13 13:15:34 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-13 21:54:13 -0700
commit1b0a74d1c002320d5488333dd9c72126af1aab02 (patch)
tree78eed6efb9cb5d97abe75cf793e5bd866381c6f9 /fs
parentf73bc8cae3481adc4188a5f34a89025c10133b0a (diff)
downloadkernel_samsung_crespo-1b0a74d1c002320d5488333dd9c72126af1aab02.zip
kernel_samsung_crespo-1b0a74d1c002320d5488333dd9c72126af1aab02.tar.gz
kernel_samsung_crespo-1b0a74d1c002320d5488333dd9c72126af1aab02.tar.bz2
[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: Jan Kara <jack@suse.cz> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index a20bbc1..3549067 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -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;