+++ /dev/null
-From: Jan Kara <jack@suse.cz>
-Subject: Fix assertion failure in mballoc code
-References: bnc#480749
-Patch-mainline: 2.6.28
-
-Backport of ext4 changes made a mistake and we enabled preallocation also for
-non-regular files. This is not expected by the mballoc code and so we
-eventually hit an assertion failure. Disable preallocation for non-regular
-files as mainline does.
-
-Signed-off-by: Jan Kara <jack@suse.cz>
-
-diff -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
---- linux-2.6.27-SLE11_BRANCH/fs/ext4/inode.c 2009-03-10 16:07:41.000000000 +0100
-+++ linux-2.6.27-SLE11_BRANCH-1-ext4_mballoc_fix/fs/ext4/inode.c 2009-03-10 16:09:05.000000000 +0100
-@@ -600,7 +600,9 @@ static int ext4_alloc_blocks(handle_t *h
- ar.goal = goal;
- ar.len = target;
- ar.logical = iblock;
-- ar.flags = EXT4_MB_HINT_DATA;
-+ if (S_ISREG(inode->i_mode))
-+ /* preallocate only for regular files */
-+ ar.flags = EXT4_MB_HINT_DATA;
-
- current_block = ext4_mb_new_blocks(handle, &ar, err);
-