| Submitter | Tao Ma |
|---|---|
| Date | Dec. 11, 2012, 2:55 a.m. |
| Message ID | <1355194545-4002-1-git-send-email-tm@tao.ma> |
| Download | mbox | patch |
| Permalink | /patch/205116/ |
| State | Superseded |
| Headers | show |
Comments
Patch
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 6b600b4..997c1aa 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -263,8 +263,10 @@ static int ext4_create_inline_data(handle_t *handle, goto out; if (len > EXT4_MIN_INLINE_DATA_SIZE) { - value = (void *)empty_zero_page; len -= EXT4_MIN_INLINE_DATA_SIZE; + value = kzalloc(len, GFP_NOFS); + if (!value) + goto out; } else { value = ""; len = 0; @@ -275,6 +277,8 @@ static int ext4_create_inline_data(handle_t *handle, i.value_len = len; error = ext4_xattr_ibody_find(inode, &i, &is); + if (len) + kfree(value); if (error) goto out;