Re: [prepatch] address_space-based writeback

Alexander Viro (viro@math.psu.edu)
Wed, 10 Apr 2002 16:53:19 -0400 (EDT)


On Wed, 10 Apr 2002, Andrew Morton wrote:

[I'll answer to the rest when I get some sleep]

> The one thing which does worry me a bit is why __mark_inode_dirty
> tests for a null ->i_sb. If the inode doesn't have a superblock
> then its pages are hidden from the writeback functions.
>
> This is not fatal per-se. The pages are still visible to the VM
> via the LRU, and presumably the filesystem knows how to sync
> its own stuff. But for memory-balancing and throttling purposes,
> I'd prefer that the null ->i_sb not be allowed. Where can this
> occur?

In rather old kernels. IOW, these checks are atavisms - these days
_all_ inodes have (constant) ->i_sb. The only way to create an
in-core inode is alloc_inode(superblock) and requires superblock
to be non-NULL. After that ->i_sb stays unchanged (and non-NULL)
until struct inode is freed.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/