> > > > + if (si->flags & (SWP_BLKDEV | SWP_FS)) { > > I re-read your discussion with Tim and I must say the reasoning behind this > test remain foggy. I was worried that the dereference inode = si->swap_file->f_mapping->host; is not always safe for corner cases. So the test makes sure that the dereference is valid. > > What goes wrong if we just remove it? If the dereference to get inode is always safe, we can remove it. Thanks. Tim