Commit 3434a16e authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Linus Torvalds

[PATCH] don't clear i_sb

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..
parent c1e4ed23
...@@ -481,7 +481,6 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) ...@@ -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 */ /* read the page of fixed disk inode (AIT) in raw mode */
mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1); mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1);
if (mp == NULL) { if (mp == NULL) {
ip->i_sb = NULL;
ip->i_nlink = 1; /* Don't want iput() deleting it */ ip->i_nlink = 1; /* Don't want iput() deleting it */
iput(ip); iput(ip);
return (NULL); return (NULL);
...@@ -494,7 +493,6 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) ...@@ -494,7 +493,6 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
/* copy on-disk inode to in-memory inode */ /* copy on-disk inode to in-memory inode */
if ((copy_from_dinode(dp, ip)) != 0) { if ((copy_from_dinode(dp, ip)) != 0) {
/* handle bad return by returning NULL for ip */ /* handle bad return by returning NULL for ip */
ip->i_sb = NULL;
ip->i_nlink = 1; /* Don't want iput() deleting it */ ip->i_nlink = 1; /* Don't want iput() deleting it */
iput(ip); iput(ip);
/* release the page */ /* release the page */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment