Re: [RFC, PATCH, RESEND] fs: push rcu_barrier() fromdeactivate_locked_super() to filesystems

From: Andrew Morton
Date: Fri Jun 08 2012 - 20:28:51 EST


On Fri, 8 Jun 2012 16:46:47 -0700 Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> Of course, if you just mean having a VFS wrapper that does
>
> static void vfs_inode_kmem_cache_destroy(struct kmem_cache *cachep)
> {
> rcu_barrier();
> kmem_cache_destroy(cachep);
> }
>
> then we could do that. Not much better than what Kirill's patch did,
> but at least we could have that comment in just one single place.

That's conceptually what I meant. But it has the problem that new and
out-of-tree filesystems might forget to do it. Which is why I suggest
adding a kmem_cache* argument to unregister_filesystem() for this.

It's a bit awkward, and the fs can pass in NULL if it knows what it's
doing. But it's reliable.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/