Merge tag 'f2fs-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[muen/linux.git] / fs / f2fs / data.c
index 912fdcc..9727944 100644 (file)
@@ -87,8 +87,9 @@ static void __read_end_io(struct bio *bio)
        struct page *page;
        struct bio_vec *bv;
        int i;
+       struct bvec_iter_all iter_all;
 
-       bio_for_each_segment_all(bv, bio, i) {
+       bio_for_each_segment_all(bv, bio, i, iter_all) {
                page = bv->bv_page;
 
                /* PG_error was set if any post_read step failed */
@@ -164,13 +165,14 @@ static void f2fs_write_end_io(struct bio *bio)
        struct f2fs_sb_info *sbi = bio->bi_private;
        struct bio_vec *bvec;
        int i;
+       struct bvec_iter_all iter_all;
 
        if (time_to_inject(sbi, FAULT_WRITE_IO)) {
                f2fs_show_injection_info(FAULT_WRITE_IO);
                bio->bi_status = BLK_STS_IOERR;
        }
 
-       bio_for_each_segment_all(bvec, bio, i) {
+       bio_for_each_segment_all(bvec, bio, i, iter_all) {
                struct page *page = bvec->bv_page;
                enum count_type type = WB_DATA_TYPE(page);
 
@@ -348,6 +350,7 @@ static bool __has_merged_page(struct f2fs_bio_info *io, struct inode *inode,
        struct bio_vec *bvec;
        struct page *target;
        int i;
+       struct bvec_iter_all iter_all;
 
        if (!io->bio)
                return false;
@@ -355,7 +358,7 @@ static bool __has_merged_page(struct f2fs_bio_info *io, struct inode *inode,
        if (!inode && !page && !ino)
                return true;
 
-       bio_for_each_segment_all(bvec, io->bio, i) {
+       bio_for_each_segment_all(bvec, io->bio, i, iter_all) {
 
                if (bvec->bv_page->mapping)
                        target = bvec->bv_page;
@@ -1466,7 +1469,7 @@ next:
        }
 
        if (size) {
-               if (f2fs_encrypted_inode(inode))
+               if (IS_ENCRYPTED(inode))
                        flags |= FIEMAP_EXTENT_DATA_ENCRYPTED;
 
                ret = fiemap_fill_next_extent(fieinfo, logical,
@@ -1736,7 +1739,7 @@ static inline bool check_inplace_update_policy(struct inode *inode,
        if (policy & (0x1 << F2FS_IPU_ASYNC) &&
                        fio && fio->op == REQ_OP_WRITE &&
                        !(fio->op_flags & REQ_SYNC) &&
-                       !f2fs_encrypted_inode(inode))
+                       !IS_ENCRYPTED(inode))
                return true;
 
        /* this is only set during fdatasync */