]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Jan Kara <jack@suse.cz> |
2 | References: fate#302681 | |
3 | Subject: ocfs2: Fix mount cleanup after quota failure | |
4 | Patch-mainline: 2.6.29? | |
5 | ||
6 | When we fail to initialize quotas during mount, the kernel oopses because | |
7 | we tried to clean-up superblock twice. | |
8 | ||
9 | Signed-off-by: Jan Kara <jack@suse.cz> | |
10 | ||
11 | --- | |
12 | fs/ocfs2/super.c | 7 ++++++- | |
13 | 1 file changed, 6 insertions(+), 1 deletion(-) | |
14 | ||
15 | --- a/fs/ocfs2/super.c | |
16 | +++ b/fs/ocfs2/super.c | |
17 | @@ -969,8 +969,13 @@ static int ocfs2_fill_super(struct super | |
18 | if (!(sb->s_flags & MS_RDONLY)) { | |
19 | status = ocfs2_enable_quotas(osb); | |
20 | if (status < 0) { | |
21 | + /* We have to err-out specially here because | |
22 | + * s_root is already set */ | |
23 | mlog_errno(status); | |
24 | - goto read_super_error; | |
25 | + atomic_set(&osb->vol_state, VOLUME_DISABLED); | |
26 | + wake_up(&osb->osb_mount_event); | |
27 | + mlog_exit(status); | |
28 | + return status; | |
29 | } | |
30 | } | |
31 |