Commit 1eb0d670 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] sem2mutex: JFFS

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 910f5d20
This diff is collapsed.
......@@ -62,7 +62,7 @@
#include <linux/fs.h>
#include <linux/stat.h>
#include <linux/pagemap.h>
#include <asm/semaphore.h>
#include <linux/mutex.h>
#include <asm/byteorder.h>
#include <linux/smp_lock.h>
#include <linux/time.h>
......@@ -3416,7 +3416,7 @@ jffs_garbage_collect_thread(void *ptr)
D1(printk (KERN_NOTICE "jffs_garbage_collect_thread(): collecting.\n"));
D3(printk (KERN_NOTICE "g_c_thread(): down biglock\n"));
down(&fmc->biglock);
mutex_lock(&fmc->biglock);
D1(printk("***jffs_garbage_collect_thread(): round #%u, "
"fmc->dirty_size = %u\n", i++, fmc->dirty_size));
......@@ -3447,6 +3447,6 @@ jffs_garbage_collect_thread(void *ptr)
gc_end:
D3(printk (KERN_NOTICE "g_c_thread(): up biglock\n"));
up(&fmc->biglock);
mutex_unlock(&fmc->biglock);
} /* for (;;) */
} /* jffs_garbage_collect_thread() */
......@@ -139,7 +139,7 @@ jffs_build_begin(struct jffs_control *c, int unit)
fmc->tail = NULL;
fmc->head_extra = NULL;
fmc->tail_extra = NULL;
init_MUTEX(&fmc->biglock);
mutex_init(&fmc->biglock);
return fmc;
}
......
......@@ -20,10 +20,11 @@
#ifndef __LINUX_JFFS_FM_H__
#define __LINUX_JFFS_FM_H__
#include <linux/config.h>
#include <linux/types.h>
#include <linux/jffs.h>
#include <linux/mtd/mtd.h>
#include <linux/config.h>
#include <linux/mutex.h>
/* The alignment between two nodes in the flash memory. */
#define JFFS_ALIGN_SIZE 4
......@@ -97,7 +98,7 @@ struct jffs_fmcontrol
struct jffs_fm *tail;
struct jffs_fm *head_extra;
struct jffs_fm *tail_extra;
struct semaphore biglock;
struct mutex biglock;
};
/* Notice the two members head_extra and tail_extra in the jffs_control
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment