lkml.org 
[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] f2fs: fix to decrease the number of dirty dentry page
Date
The f2fs_write_data_page should decrease the number of dirty dentry page
all the time.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
---
fs/f2fs/data.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 45abd60..9a3fa38 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -790,6 +790,8 @@ static int f2fs_write_data_page(struct page *page,
.rw = (wbc->sync_mode == WB_SYNC_ALL) ? WRITE_SYNC : WRITE,
};

+ inode_dec_dirty_dents(inode);
+
if (page->index < end_index)
goto write;

@@ -798,10 +800,8 @@ static int f2fs_write_data_page(struct page *page,
* this page does not have to be written to disk.
*/
offset = i_size & (PAGE_CACHE_SIZE - 1);
- if ((page->index >= end_index + 1) || !offset) {
- inode_dec_dirty_dents(inode);
+ if ((page->index >= end_index + 1) || !offset)
goto out;
- }

zero_user_segment(page, offset, PAGE_CACHE_SIZE);
write:
@@ -810,7 +810,6 @@ write:

/* Dentry blocks are controlled by checkpoint */
if (S_ISDIR(inode->i_mode)) {
- inode_dec_dirty_dents(inode);
err = do_write_data_page(page, &fio);
goto done;
}
--
1.8.4.474.g128a96c


\
 
 \ /
  Last update: 2014-04-15 13:41    [W:0.047 / U:10.772 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site