All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] vfs-call-rcu_barrier-after-kill_sb.patch removed from -mm tree
@ 2011-02-14 20:19 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2011-02-14 20:19 UTC (permalink / raw)
  To: bharrosh, boyu.mt, chris.mason, npiggin, viro, mm-commits


The patch titled
     vfs: call rcu_barrier after ->kill_sb()
has been removed from the -mm tree.  Its filename was
     vfs-call-rcu_barrier-after-kill_sb.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: vfs: call rcu_barrier after ->kill_sb()
From: Boaz Harrosh <bharrosh@panasas.com>

In fa0d7e3 ("fs: icache RCU free inodes"), we use rcu free inode instead
of freeing the inode directly.  It causes a crash when we rmmod
immediately after we umount the volume[1].

So we need to call rcu_barrier after we kill_sb so that the inode is freed
before we do rmmod.  The idea is inspired by Aneesh Kumar.  rcu_barrier
will wait for all callbacks to end before preceding.  The original patch
was done by Tao Ma, but synchronize_rcu() is not enough here.

1. http://marc.info/?l=linux-fsdevel&m=129680863330185&w=2

Tested-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/super.c |    5 +++++
 1 file changed, 5 insertions(+)

diff -puN fs/super.c~vfs-call-rcu_barrier-after-kill_sb fs/super.c
--- a/fs/super.c~vfs-call-rcu_barrier-after-kill_sb
+++ a/fs/super.c
@@ -177,6 +177,11 @@ void deactivate_locked_super(struct supe
 	struct file_system_type *fs = s->s_type;
 	if (atomic_dec_and_test(&s->s_active)) {
 		fs->kill_sb(s);
+		/*
+		 * We need to call rcu_barrier so all the delayed rcu free
+		 * inodes are flushed before we release the fs module.
+		 */
+		rcu_barrier();
 		put_filesystem(fs);
 		put_super(s);
 	} else {
_

Patches currently in -mm which might be from bharrosh@panasas.com are

origin.patch
linux-next.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-14 20:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 20:19 [merged] vfs-call-rcu_barrier-after-kill_sb.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.