linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Viro <viro@math.psu.edu>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fs/super.c stuff (2/10)
Date: Mon, 11 Jun 2001 01:33:43 -0400 (EDT)	[thread overview]
Message-ID: <Pine.GSO.4.21.0106110133160.24249-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <Pine.GSO.4.21.0106110132340.24249-100000@weyl.math.psu.edu>

diff -urN S6-pre2-mnt_instances/fs/super.c S6-pre2-s_active/fs/super.c
--- S6-pre2-mnt_instances/fs/super.c	Sat Jun  9 19:18:31 2001
+++ S6-pre2-s_active/fs/super.c	Sun Jun 10 12:07:40 2001
@@ -388,7 +388,6 @@
 	spin_lock(&dcache_lock);
 	list_add(&mnt->mnt_list, vfsmntlist.prev);
 	spin_unlock(&dcache_lock);
-	atomic_inc(&sb->s_active);
 	if (sb->s_type->fs_flags & FS_SINGLE)
 		get_filesystem(sb->s_type);
 out:
@@ -740,6 +739,7 @@
 	     s  = sb_entry(s->s_list.next)) {
 		if (s->s_dev)
 			continue;
+		atomic_inc(&s->s_active);
 		return s;
 	}
 	/* Need a new one... */
@@ -755,7 +755,7 @@
 		INIT_LIST_HEAD(&s->s_files);
 		init_rwsem(&s->s_umount);
 		sema_init(&s->s_lock, 1);
-		atomic_set(&s->s_active, 0);
+		atomic_set(&s->s_active, 1);
 		sema_init(&s->s_vfs_rename_sem,1);
 		sema_init(&s->s_nfsd_free_path_sem,1);
 		sema_init(&s->s_dquot.dqio_sem, 1);
@@ -794,6 +794,7 @@
 	s->s_bdev = 0;
 	s->s_type = NULL;
 	unlock_super(s);
+	atomic_dec(&s->s_active);
 	return NULL;
 }
 
@@ -860,6 +861,7 @@
 		if (fs_type == sb->s_type &&
 		    ((flags ^ sb->s_flags) & MS_RDONLY) == 0) {
 			path_release(&nd);
+			atomic_inc(&sb->s_active);
 			return sb;
 		}
 	} else {
@@ -923,6 +925,7 @@
 	if (!sb)
 		BUG();
 	do_remount_sb(sb, flags, data);
+	atomic_inc(&sb->s_active);
 	return sb;
 }
 
@@ -1038,7 +1041,6 @@
 	mnt->mnt_root = dget(sb->s_root);
 	mnt->mnt_mountpoint = mnt->mnt_root;
 	mnt->mnt_parent = mnt;
-	atomic_inc(&sb->s_active);
 	type->kern_mnt = mnt;
 	return mnt;
 }
@@ -1315,7 +1317,6 @@
 	mnt->mnt_root = dget(sb->s_root);
 	mnt->mnt_mountpoint = mnt->mnt_root;
 	mnt->mnt_parent = mnt;
-	atomic_inc(&sb->s_active);
 
 	/* Something was mounted here while we slept */
 	while(d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry))
@@ -1573,6 +1574,7 @@
 	sb = get_super(ROOT_DEV);
 	if (sb) {
 		fs_type = sb->s_type;
+		atomic_inc(&sb->s_active);
 		goto mount_it;
 	}
 



  reply	other threads:[~2001-06-11  5:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-11  5:32 [PATCHes] fs/super.c stuff Alexander Viro
2001-06-11  5:33 ` [PATCH] fs/super.c stuff (1/10) Alexander Viro
2001-06-11  5:33   ` Alexander Viro [this message]
2001-06-11  5:34     ` [PATCH] fs/super.c stuff (3/10) Alexander Viro
2001-06-11  5:34     ` Alexander Viro
2001-06-11  5:35       ` [PATCH] fs/super.c stuff (5/10) Alexander Viro
2001-06-11  5:37         ` [PATCH] fs/super.c stuff (6/10) Alexander Viro
2001-06-11  5:37           ` [PATCH] fs/super.c stuff (7/10) Alexander Viro
2001-06-11  5:38             ` [PATCH] fs/super.c stuff (8/10) Alexander Viro
2001-06-11  5:39               ` [PATCH] fs/super.c stuff (9/10) Alexander Viro
2001-06-11  5:40                 ` [PATCH] fs/super.c stuff (10/10) Alexander Viro
2001-06-11  5:36       ` [PATCH] fs/super.c stuff (3/10) Alexander Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.21.0106110133160.24249-100000@weyl.math.psu.edu \
    --to=viro@math.psu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).