lkml.org 
[lkml]   [2013]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[f2fs-dev] [PATCH] f2fs: avoid to left uninitialized data in page when read inline data
Date
We left uninitialized data in the tail of page when we read an inline data
page. So let's initialize left part of the page excluding inline data region.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
fs/f2fs/inline.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 0e940ce..eebda9b 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -48,8 +48,7 @@ int f2fs_read_inline_data(struct inode *inode, struct page *page)
if (IS_ERR(ipage))
return PTR_ERR(ipage);

- zero_user_segment(page, INLINE_DATA_OFFSET,
- INLINE_DATA_OFFSET + MAX_INLINE_DATA);
+ zero_user_segment(page, MAX_INLINE_DATA, PAGE_CACHE_SIZE);

/* Copy the whole inline data block */
src_addr = inline_data_addr(ipage);
--
1.7.9.5


\
 
 \ /
  Last update: 2013-12-28 14:41    [W:0.032 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site