On Fri, Apr 08, 2022 at 09:00:01PM +0900, Paran Lee wrote: > +++ b/fs/fs-writeback.c > @@ -1357,12 +1357,14 @@ static int move_expired_inodes(struct list_head *delaying_queue, > LIST_HEAD(tmp); > struct list_head *pos, *node; > struct super_block *sb = NULL; > - struct inode *inode; > + struct inode *inode = NULL; Not needed; in fact I would move the definition of inode to inside the while loop. > int do_sb_sort = 0; > int moved = 0; > > while (!list_empty(delaying_queue)) { > inode = wb_inode(delaying_queue->prev); > + if (!inode) > + continue; Did you look at the definition of wb_inode? It can't possibly return a NULL pointer. > /* Move inodes from one superblock together */ > while (!list_empty(&tmp)) { > - sb = wb_inode(tmp.prev)->i_sb; > + inode = wb_inode(tmp.prev); > + if (!inode) > + continue; > + sb = inode->i_sb; > + if (!sb) > + continue; Can you explain how inode might have a NULL i_sb?