Fix patch formatting.
[ext4-patch-queue.git] / ext4-donot-mark-filesystem-error-if-preallocation-fails.patch
blob556b5c0c1b6ade5e22499e99728fd26cf27f2858
1 From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
3 ext4: Don't mark filesystem error if fallocate fails
5 IF we fail to allocate blocks don't call ext4_error. Also don't hide errors
6 from ext4_get_blocks_wrap
8 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
9 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
10 ---
11 fs/ext4/extents.c | 11 ++++++-----
12 1 file changed, 6 insertions(+), 5 deletions(-)
14 Index: linux-2.6.25-rc2/fs/ext4/extents.c
15 ===================================================================
16 --- linux-2.6.25-rc2.orig/fs/ext4/extents.c 2008-02-19 00:12:11.000000000 -0800
17 +++ linux-2.6.25-rc2/fs/ext4/extents.c 2008-02-19 00:15:15.000000000 -0800
18 @@ -2661,13 +2661,14 @@ retry:
19 ret = ext4_get_blocks_wrap(handle, inode, block,
20 max_blocks, &map_bh,
21 EXT4_CREATE_UNINITIALIZED_EXT, 0);
22 - WARN_ON(ret <= 0);
23 if (ret <= 0) {
24 - ext4_error(inode->i_sb, "ext4_fallocate",
25 - "ext4_ext_get_blocks returned error: "
26 - "inode#%lu, block=%u, max_blocks=%lu",
27 +#ifdef EXT4FS_DEBUG
28 + WARN_ON(ret <= 0);
29 + printk(KERN_ERR "%s: ext4_ext_get_blocks "
30 + "returned error inode#%lu, block=%u, "
31 + "max_blocks=%lu", __func__,
32 inode->i_ino, block, max_blocks);
33 - ret = -EIO;
34 +#endif
35 ext4_mark_inode_dirty(handle, inode);
36 ret2 = ext4_journal_stop(handle);
37 break;