1 ext4: return -ENOMEM instead of success
3 From: Dan Carpenter <dan.carpenter@oracle.com>
5 We should set the error code if kzalloc() fails.
7 Fixes: 67cf5b09a46f ("ext4: add the basic function for inline data support")
8 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
10 Cc: stable@vger.kernel.org
12 diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
13 index 9b67f75bdcf7..437df6a1a841 100644
14 --- a/fs/ext4/inline.c
15 +++ b/fs/ext4/inline.c
16 @@ -341,8 +341,10 @@ static int ext4_update_inline_data(handle_t *handle, struct inode *inode,
18 len -= EXT4_MIN_INLINE_DATA_SIZE;
19 value = kzalloc(len, GFP_NOFS);
26 error = ext4_xattr_ibody_get(inode, i.name_index, i.name,