diff options
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index b0ee0fdf799a..a3f8871d21fd 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1218,13 +1218,17 @@ static void ocfs2_kill_sb(struct super_block *sb) | |||
1218 | { | 1218 | { |
1219 | struct ocfs2_super *osb = OCFS2_SB(sb); | 1219 | struct ocfs2_super *osb = OCFS2_SB(sb); |
1220 | 1220 | ||
1221 | /* Failed mount? */ | ||
1222 | if (!osb || atomic_read(&osb->vol_state) == VOLUME_DISABLED) | ||
1223 | goto out; | ||
1224 | |||
1221 | /* Prevent further queueing of inode drop events */ | 1225 | /* Prevent further queueing of inode drop events */ |
1222 | spin_lock(&dentry_list_lock); | 1226 | spin_lock(&dentry_list_lock); |
1223 | ocfs2_set_osb_flag(osb, OCFS2_OSB_DROP_DENTRY_LOCK_IMMED); | 1227 | ocfs2_set_osb_flag(osb, OCFS2_OSB_DROP_DENTRY_LOCK_IMMED); |
1224 | spin_unlock(&dentry_list_lock); | 1228 | spin_unlock(&dentry_list_lock); |
1225 | /* Wait for work to finish and/or remove it */ | 1229 | /* Wait for work to finish and/or remove it */ |
1226 | cancel_work_sync(&osb->dentry_lock_work); | 1230 | cancel_work_sync(&osb->dentry_lock_work); |
1227 | 1231 | out: | |
1228 | kill_block_super(sb); | 1232 | kill_block_super(sb); |
1229 | } | 1233 | } |
1230 | 1234 | ||