diff options
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index e3b7cfa17b99..3bc380942068 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -870,7 +870,7 @@ static int f2fs_write_data_pages(struct address_space *mapping, | |||
870 | 870 | ||
871 | if (S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_NONE && | 871 | if (S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_NONE && |
872 | get_dirty_dents(inode) < nr_pages_to_skip(sbi, DATA)) | 872 | get_dirty_dents(inode) < nr_pages_to_skip(sbi, DATA)) |
873 | return 0; | 873 | goto skip_write; |
874 | 874 | ||
875 | if (wbc->nr_to_write < MAX_DESIRED_PAGES_WP) { | 875 | if (wbc->nr_to_write < MAX_DESIRED_PAGES_WP) { |
876 | desired_nrtw = MAX_DESIRED_PAGES_WP; | 876 | desired_nrtw = MAX_DESIRED_PAGES_WP; |
@@ -892,6 +892,10 @@ static int f2fs_write_data_pages(struct address_space *mapping, | |||
892 | 892 | ||
893 | wbc->nr_to_write -= excess_nrtw; | 893 | wbc->nr_to_write -= excess_nrtw; |
894 | return ret; | 894 | return ret; |
895 | |||
896 | skip_write: | ||
897 | wbc->pages_skipped += get_dirty_dents(inode); | ||
898 | return 0; | ||
895 | } | 899 | } |
896 | 900 | ||
897 | static int f2fs_write_begin(struct file *file, struct address_space *mapping, | 901 | static int f2fs_write_begin(struct file *file, struct address_space *mapping, |