diff options
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index b4a02a00665d..e27a0d47ea2b 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1186,7 +1186,7 @@ leave: | |||
1186 | 1186 | ||
1187 | static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err) | 1187 | static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err) |
1188 | { | 1188 | { |
1189 | int tmp; | 1189 | int tmp, hangup_needed = 0; |
1190 | struct ocfs2_super *osb = NULL; | 1190 | struct ocfs2_super *osb = NULL; |
1191 | char nodestr[8]; | 1191 | char nodestr[8]; |
1192 | 1192 | ||
@@ -1225,19 +1225,21 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err) | |||
1225 | 1225 | ||
1226 | ocfs2_release_system_inodes(osb); | 1226 | ocfs2_release_system_inodes(osb); |
1227 | 1227 | ||
1228 | if (osb->cconn) | ||
1229 | ocfs2_dlm_shutdown(osb); | ||
1230 | |||
1231 | debugfs_remove(osb->osb_debug_root); | ||
1232 | |||
1233 | /* | 1228 | /* |
1234 | * This is a small hack to move ocfs2_hb_ctl into stackglue. | ||
1235 | * If we're dismounting due to mount error, mount.ocfs2 will clean | 1229 | * If we're dismounting due to mount error, mount.ocfs2 will clean |
1236 | * up heartbeat. If we're a local mount, there is no heartbeat. | 1230 | * up heartbeat. If we're a local mount, there is no heartbeat. |
1237 | * If we failed before we got a uuid_str yet, we can't stop | 1231 | * If we failed before we got a uuid_str yet, we can't stop |
1238 | * heartbeat. Otherwise, do it. | 1232 | * heartbeat. Otherwise, do it. |
1239 | */ | 1233 | */ |
1240 | if (!mnt_err && !ocfs2_mount_local(osb) && osb->uuid_str) | 1234 | if (!mnt_err && !ocfs2_mount_local(osb) && osb->uuid_str) |
1235 | hangup_needed = 1; | ||
1236 | |||
1237 | if (osb->cconn) | ||
1238 | ocfs2_dlm_shutdown(osb, hangup_needed); | ||
1239 | |||
1240 | debugfs_remove(osb->osb_debug_root); | ||
1241 | |||
1242 | if (hangup_needed) | ||
1241 | ocfs2_cluster_hangup(osb->uuid_str, strlen(osb->uuid_str)); | 1243 | ocfs2_cluster_hangup(osb->uuid_str, strlen(osb->uuid_str)); |
1242 | 1244 | ||
1243 | atomic_set(&osb->vol_state, VOLUME_DISMOUNTED); | 1245 | atomic_set(&osb->vol_state, VOLUME_DISMOUNTED); |