Fix random whitespace issues and other checkpatch flameage. Also made
[ext4-patch-queue.git] / ext4-check-ext4_ext_split-return-failure.patch
blobaa3f47b604fce4e5c15832d5bfad621d550f7b4a
1 ext4: return error when calling ext4_ext_split failed
3 From: Shen Feng <shen@cn.fujitsu.com>
5 ext4_ext_create_new_leaf must return error when its
6 calling to ext4_ext_split failed.
8 Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
9 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
10 Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
11 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 ---
13 fs/ext4/extents.c | 2 ++
14 1 file changed, 2 insertions(+)
16 Index: linux-2.6.26-rc6/fs/ext4/extents.c
17 ===================================================================
18 --- linux-2.6.26-rc6.orig/fs/ext4/extents.c 2008-06-17 10:43:28.000000000 -0700
19 +++ linux-2.6.26-rc6/fs/ext4/extents.c 2008-06-17 10:43:29.000000000 -0700
20 @@ -981,6 +981,8 @@ repeat:
21 /* if we found index with free entry, then use that
22 * entry: create all needed subtree and add new leaf */
23 err = ext4_ext_split(handle, inode, path, newext, i);
24 + if (err)
25 + goto out;
27 /* refill path */
28 ext4_ext_drop_refs(path);