diff options
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 364d64bd5f10..046824b6b625 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -932,7 +932,7 @@ static void ocfs2_inode_init_once(void *data, | |||
932 | oi->ip_dir_start_lookup = 0; | 932 | oi->ip_dir_start_lookup = 0; |
933 | 933 | ||
934 | init_rwsem(&oi->ip_alloc_sem); | 934 | init_rwsem(&oi->ip_alloc_sem); |
935 | init_MUTEX(&(oi->ip_io_sem)); | 935 | mutex_init(&oi->ip_io_mutex); |
936 | 936 | ||
937 | oi->ip_blkno = 0ULL; | 937 | oi->ip_blkno = 0ULL; |
938 | oi->ip_clusters = 0; | 938 | oi->ip_clusters = 0; |
@@ -1137,9 +1137,9 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err) | |||
1137 | 1137 | ||
1138 | /* disable any new recovery threads and wait for any currently | 1138 | /* disable any new recovery threads and wait for any currently |
1139 | * running ones to exit. Do this before setting the vol_state. */ | 1139 | * running ones to exit. Do this before setting the vol_state. */ |
1140 | down(&osb->recovery_lock); | 1140 | mutex_lock(&osb->recovery_lock); |
1141 | osb->disable_recovery = 1; | 1141 | osb->disable_recovery = 1; |
1142 | up(&osb->recovery_lock); | 1142 | mutex_unlock(&osb->recovery_lock); |
1143 | wait_event(osb->recovery_event, !ocfs2_recovery_thread_running(osb)); | 1143 | wait_event(osb->recovery_event, !ocfs2_recovery_thread_running(osb)); |
1144 | 1144 | ||
1145 | /* At this point, we know that no more recovery threads can be | 1145 | /* At this point, we know that no more recovery threads can be |
@@ -1254,8 +1254,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
1254 | osb->sb = sb; | 1254 | osb->sb = sb; |
1255 | /* Save off for ocfs2_rw_direct */ | 1255 | /* Save off for ocfs2_rw_direct */ |
1256 | osb->s_sectsize_bits = blksize_bits(sector_size); | 1256 | osb->s_sectsize_bits = blksize_bits(sector_size); |
1257 | if (!osb->s_sectsize_bits) | 1257 | BUG_ON(!osb->s_sectsize_bits); |
1258 | BUG(); | ||
1259 | 1258 | ||
1260 | osb->net_response_ids = 0; | 1259 | osb->net_response_ids = 0; |
1261 | spin_lock_init(&osb->net_response_lock); | 1260 | spin_lock_init(&osb->net_response_lock); |
@@ -1283,7 +1282,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
1283 | snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u", | 1282 | snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u", |
1284 | MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev)); | 1283 | MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev)); |
1285 | 1284 | ||
1286 | init_MUTEX(&osb->recovery_lock); | 1285 | mutex_init(&osb->recovery_lock); |
1287 | 1286 | ||
1288 | osb->disable_recovery = 0; | 1287 | osb->disable_recovery = 0; |
1289 | osb->recovery_thread_task = NULL; | 1288 | osb->recovery_thread_task = NULL; |