]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Jan Kara <jack@suse.cz> |
2 | References: fate#302681 | |
3 | Subject: ocfs2: Fix recovery of nodes when quota feature is disabled | |
4 | Patch-mainline: 2.6.29? | |
5 | ||
6 | When quota feature is disabled, uninitialized content of variable status got | |
7 | passed up from ocfs2_begin_quota_recovery() which could then cause problems, | |
8 | even more so because we queued quota recovery structure even when pointer | |
9 | was invalid. | |
10 | ||
11 | Signed-off-by: Jan Kara <jack@suse.cz> | |
12 | ||
13 | --- | |
14 | fs/ocfs2/journal.c | 1 + | |
15 | fs/ocfs2/quota_local.c | 2 +- | |
16 | 2 files changed, 2 insertions(+), 1 deletion(-) | |
17 | ||
18 | --- a/fs/ocfs2/journal.c | |
19 | +++ b/fs/ocfs2/journal.c | |
20 | @@ -1135,6 +1135,7 @@ skip_recovery: | |
21 | if (IS_ERR(qrec)) { | |
22 | status = PTR_ERR(qrec); | |
23 | mlog_errno(status); | |
24 | + continue; | |
25 | } | |
26 | ocfs2_queue_recovery_completion(osb->journal, rm_quota[i], | |
27 | NULL, NULL, qrec); | |
28 | --- a/fs/ocfs2/quota_local.c | |
29 | +++ b/fs/ocfs2/quota_local.c | |
30 | @@ -365,7 +365,7 @@ struct ocfs2_quota_recovery *ocfs2_begin | |
31 | struct inode *lqinode; | |
32 | struct buffer_head *bh; | |
33 | int type; | |
34 | - int status; | |
35 | + int status = 0; | |
36 | struct ocfs2_quota_recovery *rec; | |
37 | ||
38 | mlog(ML_NOTICE, "Beginning quota recovery in slot %u\n", slot_num); |