lkml.org 
[lkml]   [2001]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] (11/11) fs/super.c fixes

Part 11/11

Cleanup: we move decrementing ->s_active into put_super(). Callers updated.

diff -urN S9-pre3-s_count/fs/super.c S9-pre3-put_super/fs/super.c
--- S9-pre3-s_count/fs/super.c Mon Aug 13 21:21:29 2001
+++ S9-pre3-put_super/fs/super.c Mon Aug 13 21:21:29 2001
@@ -666,6 +666,7 @@

static void put_super(struct super_block *sb)
{
+ atomic_dec(&sb->s_active);
up_write(&sb->s_umount);
__put_super(sb);
}
@@ -832,7 +833,6 @@
s->s_bdev = 0;
s->s_type = NULL;
unlock_super(s);
- atomic_dec(&s->s_active);
spin_lock(&sb_lock);
list_del(&s->s_list);
list_del(&s->s_instances);
@@ -885,7 +885,6 @@
}
spin_unlock(&sb_lock);
}
- atomic_dec(&sb->s_active);
put_super(sb);
return 0;
}
@@ -950,13 +949,11 @@
if (old->s_type != fs_type ||
((flags ^ old->s_flags) & MS_RDONLY)) {
spin_unlock(&sb_lock);
- atomic_dec(&s->s_active);
put_super(s);
goto out1;
}
if (!grab_super(old))
goto restart;
- atomic_dec(&s->s_active);
put_super(s);
blkdev_put(bdev, BDEV_FS);
path_release(&nd);
@@ -988,7 +985,6 @@
s->s_bdev = 0;
s->s_type = NULL;
unlock_super(s);
- atomic_dec(&s->s_active);
spin_lock(&sb_lock);
list_del(&s->s_list);
list_del(&s->s_instances);
@@ -1044,14 +1040,12 @@
s_instances);
if (!grab_super(old))
goto retry;
- atomic_dec(&s->s_active);
put_super(s);
do_remount_sb(old, flags, data);
return old;
} else {
kdev_t dev = get_unnamed_dev();
if (!dev) {
- atomic_dec(&s->s_active);
put_super(s);
up(&mount_sem);
return ERR_PTR(-EMFILE);
@@ -1075,7 +1069,6 @@
s->s_bdev = 0;
s->s_type = NULL;
unlock_super(s);
- atomic_dec(&s->s_active);
spin_lock(&sb_lock);
list_del(&s->s_list);
list_del(&s->s_instances);
@@ -1142,6 +1135,7 @@
list_del(&sb->s_list);
list_del(&sb->s_instances);
spin_unlock(&sb_lock);
+ atomic_inc(&sb->s_active);
put_super(sb);
}


-
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/

\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.033 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site