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..
/* 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);
/* 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 */