]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/ext4-mballoc-preallocate.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ext4-mballoc-preallocate.patch
CommitLineData
00e5a55c
BS
1From: Jan Kara <jack@suse.cz>
2Subject: Fix assertion failure in mballoc code
3References: bnc#480749
4Patch-mainline: 2.6.28
5
6Backport of ext4 changes made a mistake and we enabled preallocation also for
7non-regular files. This is not expected by the mballoc code and so we
8eventually hit an assertion failure. Disable preallocation for non-regular
9files as mainline does.
10
11Signed-off-by: Jan Kara <jack@suse.cz>
12
13diff -rupX /home/jack/.kerndiffexclude linux-2.6.27-SLE11_BRANCH/fs/ext4/inode.c linux-2.6.27-SLE11_BRANCH-1-ext4_mballoc_fix/fs/ext4/inode.c
14--- linux-2.6.27-SLE11_BRANCH/fs/ext4/inode.c 2009-03-10 16:07:41.000000000 +0100
15+++ linux-2.6.27-SLE11_BRANCH-1-ext4_mballoc_fix/fs/ext4/inode.c 2009-03-10 16:09:05.000000000 +0100
16@@ -600,7 +600,9 @@ static int ext4_alloc_blocks(handle_t *h
17 ar.goal = goal;
18 ar.len = target;
19 ar.logical = iblock;
20- ar.flags = EXT4_MB_HINT_DATA;
21+ if (S_ISREG(inode->i_mode))
22+ /* preallocate only for regular files */
23+ ar.flags = EXT4_MB_HINT_DATA;
24
25 current_block = ext4_mb_new_blocks(handle, &ar, err);
26