.. | .. |
---|
698 | 698 | } |
---|
699 | 699 | |
---|
700 | 700 | if (fio->io_wbc && !is_read_io(fio->op)) |
---|
701 | | - wbc_account_cgroup_owner(fio->io_wbc, page, PAGE_SIZE); |
---|
| 701 | + wbc_account_cgroup_owner(fio->io_wbc, fio->page, PAGE_SIZE); |
---|
702 | 702 | |
---|
703 | 703 | __attach_io_flag(fio); |
---|
704 | 704 | bio_set_op_attrs(bio, fio->op, fio->op_flags); |
---|
.. | .. |
---|
829 | 829 | bool found = false; |
---|
830 | 830 | struct bio *target = bio ? *bio : NULL; |
---|
831 | 831 | |
---|
| 832 | + f2fs_bug_on(sbi, !target && !page); |
---|
| 833 | + |
---|
832 | 834 | for (temp = HOT; temp < NR_TEMP_TYPE && !found; temp++) { |
---|
833 | 835 | struct f2fs_bio_info *io = sbi->write_io[DATA] + temp; |
---|
834 | 836 | struct list_head *head = &io->bio_list; |
---|
.. | .. |
---|
908 | 910 | } |
---|
909 | 911 | |
---|
910 | 912 | if (fio->io_wbc) |
---|
911 | | - wbc_account_cgroup_owner(fio->io_wbc, page, PAGE_SIZE); |
---|
| 913 | + wbc_account_cgroup_owner(fio->io_wbc, fio->page, PAGE_SIZE); |
---|
912 | 914 | |
---|
913 | 915 | inc_page_count(fio->sbi, WB_DATA_TYPE(page)); |
---|
914 | 916 | |
---|
.. | .. |
---|
982 | 984 | } |
---|
983 | 985 | |
---|
984 | 986 | if (fio->io_wbc) |
---|
985 | | - wbc_account_cgroup_owner(fio->io_wbc, bio_page, PAGE_SIZE); |
---|
| 987 | + wbc_account_cgroup_owner(fio->io_wbc, fio->page, PAGE_SIZE); |
---|
986 | 988 | |
---|
987 | 989 | io->last_block_in_bio = fio->new_blkaddr; |
---|
988 | 990 | |
---|
.. | .. |
---|
2770 | 2772 | * don't drop any dirty dentry pages for keeping lastest |
---|
2771 | 2773 | * directory structure. |
---|
2772 | 2774 | */ |
---|
2773 | | - if (S_ISDIR(inode->i_mode)) |
---|
| 2775 | + if (S_ISDIR(inode->i_mode) && |
---|
| 2776 | + !is_sbi_flag_set(sbi, SBI_IS_CLOSE)) |
---|
2774 | 2777 | goto redirty_out; |
---|
2775 | 2778 | goto out; |
---|
2776 | 2779 | } |
---|
.. | .. |
---|
2875 | 2878 | |
---|
2876 | 2879 | if (unlikely(f2fs_cp_error(sbi))) { |
---|
2877 | 2880 | f2fs_submit_merged_write(sbi, DATA); |
---|
2878 | | - f2fs_submit_merged_ipu_write(sbi, bio, NULL); |
---|
| 2881 | + if (bio && *bio) |
---|
| 2882 | + f2fs_submit_merged_ipu_write(sbi, bio, NULL); |
---|
2879 | 2883 | submitted = NULL; |
---|
2880 | 2884 | } |
---|
2881 | 2885 | |
---|