]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.suse/ocfs2-Fix-oop-in-recovery-without-quotas
Revert "Move xen patchset to new version's subdir."
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / ocfs2-Fix-oop-in-recovery-without-quotas
CommitLineData
00e5a55c
BS
1From: Jan Kara <jack@suse.cz>
2References: fate#302681
3Subject: ocfs2: Fix recovery of nodes when quota feature is disabled
4Patch-mainline: 2.6.29?
5
6When quota feature is disabled, uninitialized content of variable status got
7passed up from ocfs2_begin_quota_recovery() which could then cause problems,
8even more so because we queued quota recovery structure even when pointer
9was invalid.
10
11Signed-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);