tree 78eed6efb9cb5d97abe75cf793e5bd866381c6f9
parent f73bc8cae3481adc4188a5f34a89025c10133b0a
author Jan Kara <[EMAIL PROTECTED]> Sat, 13 Aug 2005 13:15:34 +0200
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 14 Aug 2005 11:54:13 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/reiserfs/namei.c |    3 +++
 1 files changed, 3 insertions(+)

diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -593,6 +593,9 @@ static int new_inode_init(struct inode *
         */
        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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to