]> git.hungrycats.org Git - linux/commitdiff
[PATCH] don't clear i_sb
authorDave Kleikamp <shaggy@austin.ibm.com>
Wed, 7 Jan 2004 02:35:15 +0000 (18:35 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 7 Jan 2004 02:35:15 +0000 (18:35 -0800)
From: Christoph Hellwig <hch@lst.de>

JFS currently clears i_sb in some error pathes which can make the
core kernel OOPS because it may never be NULL.  Noticed because some
IBM people try to "fix" the core kernel for it now..

fs/jfs/jfs_imap.c

index 74185890b615ac072dec33c2df7aa37dcc767b37..14da85531615d3dc49f4403da08dd8b267c60781 100644 (file)
@@ -481,7 +481,6 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
        /* read the page of fixed disk inode (AIT) in raw mode */
        mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1);
        if (mp == NULL) {
-               ip->i_sb = NULL;
                ip->i_nlink = 1;        /* Don't want iput() deleting it */
                iput(ip);
                return (NULL);
@@ -494,7 +493,6 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
        /* copy on-disk inode to in-memory inode */
        if ((copy_from_dinode(dp, ip)) != 0) {
                /* handle bad return by returning NULL for ip */
-               ip->i_sb = NULL;
                ip->i_nlink = 1;        /* Don't want iput() deleting it */
                iput(ip);
                /* release the page */