Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
[sfrench/cifs-2.6.git] / fs / f2fs / data.c
index f91d8630c9a2d768d365e443811c37a4a1023a1e..568e1d09eb4864d42ed7ceedec55cb6465b229b2 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);
 
@@ -347,6 +349,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;
@@ -354,7 +357,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;
@@ -1465,7 +1468,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 */