Merge branch 'linus' into core/rcu
[safe/jmp/linux-2.6] / fs / nilfs2 / the_nilfs.h
index d0cf4fb..1b9caaf 100644 (file)
@@ -49,6 +49,7 @@ enum {
  * @ns_writer: back pointer to writable nilfs_sb_info
  * @ns_sem: semaphore for shared states
  * @ns_super_sem: semaphore for global operations across super block instances
+ * @ns_mount_mutex: mutex protecting mount process of nilfs
  * @ns_writer_mutex: mutex protecting ns_writer attach/detach
  * @ns_writer_refcount: number of referrers on ns_writer
  * @ns_current: back pointer to current mount
@@ -98,6 +99,7 @@ struct the_nilfs {
        struct nilfs_sb_info   *ns_writer;
        struct rw_semaphore     ns_sem;
        struct rw_semaphore     ns_super_sem;
+       struct mutex            ns_mount_mutex;
        struct mutex            ns_writer_mutex;
        atomic_t                ns_writer_refcount;
 
@@ -251,7 +253,7 @@ nilfs_detach_writer(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
 
 static inline void nilfs_put_sbinfo(struct nilfs_sb_info *sbi)
 {
-       if (!atomic_dec_and_test(&sbi->s_count))
+       if (atomic_dec_and_test(&sbi->s_count))
                kfree(sbi);
 }