From 353ab6e97b8f209dbecc9f650f1f84e3da2a7bb1 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sun, 26 Mar 2006 01:37:12 -0800 Subject: [PATCH] sem2mutex: fs/ Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar Cc: Eric Van Hensbergen Cc: Robert Love Cc: Thomas Gleixner Cc: David Woodhouse Cc: Neil Brown Cc: Trond Myklebust Cc: Dave Kleikamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/super.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fs/super.c') diff --git a/fs/super.c b/fs/super.c index 8743e9bbb29..a66f66bb804 100644 --- a/fs/super.c +++ b/fs/super.c @@ -37,6 +37,7 @@ #include /* for the emergency remount stuff */ #include #include +#include #include @@ -380,9 +381,9 @@ restart: void sync_filesystems(int wait) { struct super_block *sb; - static DECLARE_MUTEX(mutex); + static DEFINE_MUTEX(mutex); - down(&mutex); /* Could be down_interruptible */ + mutex_lock(&mutex); /* Could be down_interruptible */ spin_lock(&sb_lock); list_for_each_entry(sb, &super_blocks, s_list) { if (!sb->s_op->sync_fs) @@ -411,7 +412,7 @@ restart: goto restart; } spin_unlock(&sb_lock); - up(&mutex); + mutex_unlock(&mutex); } /** -- cgit