On Mon, Nov 08, 2010 at 12:00:52AM -0500, Ted Ts'o wrote: > On Mon, Nov 08, 2010 at 12:19:19PM +1100, Dave Chinner wrote: > > > > Doesn't this mean you are tossing away unwritten extent conversion > > processing when IO is issued on any inode in the I_WILL_FREE/I_FREEING > > state, or completing IO after the unmount is in progress? > > Yeah, thanks for pointing that out. Clearly I must have been > sleep-deprived, since I had managed to convince myself we'd only end > up in this situation when the inode had been deleted (as opposed to > the situation where there's so much memory pressure that we're pushing > out an inode that still has writebacks pending). .... > @@ -254,9 +253,30 @@ static void ext4_end_bio(struct bio *bio, int error) > if (!partial_write) > SetPageUptodate(page); > } > - > io_end->num_io_pages = 0; > > + if ((inode = io_end->inode) == NULL) > + goto no_work; > + > + if (!(inode->i_sb->s_flags & MS_ACTIVE)) { > + pr_err("sb umounted, discard end_io request for inode %lu\n", > + io_end->inode->i_ino); > + no_work: > + ext4_free_io_end(io_end); > + return; > + } These checks are no longer necessary. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html