]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/jffs2/jffs2_fs_sb.h
[JFFS2] semaphore->mutex conversion
[net-next-2.6.git] / fs / jffs2 / jffs2_fs_sb.h
index 18fca2b9e53192355fe26ca16f71c76b7af35d93..d9c4b27575e8cf1293925c0921eb2e64f5748984 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
 #include <linux/completion.h>
-#include <linux/semaphore.h>
+#include <linux/mutex.h>
 #include <linux/timer.h>
 #include <linux/wait.h>
 #include <linux/list.h>
@@ -44,7 +44,7 @@ struct jffs2_sb_info {
        struct completion gc_thread_start; /* GC thread start completion */
        struct completion gc_thread_exit; /* GC thread exit completion port */
 
-       struct semaphore alloc_sem;     /* Used to protect all the following
+       struct mutex alloc_sem;         /* Used to protect all the following
                                           fields, and also to protect against
                                           out-of-order writing of nodes. And GC. */
        uint32_t cleanmarker_size;      /* Size of an _inline_ CLEANMARKER
@@ -104,7 +104,7 @@ struct jffs2_sb_info {
        /* Sem to allow jffs2_garbage_collect_deletion_dirent to
           drop the erase_completion_lock while it's holding a pointer
           to an obsoleted node. I don't like this. Alternatives welcomed. */
-       struct semaphore erase_free_sem;
+       struct mutex erase_free_sem;
 
        uint32_t wbuf_pagesize; /* 0 for NOR and other flashes with no wbuf */