Whamcloud - gitweb
LU-13004 modules: replace lnet_kiov_t with struct bio_vec
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7.6 / ext4-attach-jinode-in-writepages.patch
1 Index: linux-stage/fs/ext4/inode.c
2 ===================================================================
3 --- linux-stage.orig/fs/ext4/inode.c
4 +++ linux-stage/fs/ext4/inode.c
5 @@ -745,6 +745,9 @@ out_sem:
6                     !(flags & EXT4_GET_BLOCKS_ZERO) &&
7                     !IS_NOQUOTA(inode) &&
8                     ext4_should_order_data(inode)) {
9 +                       ret = ext4_inode_attach_jinode(inode);
10 +                       if (ret)
11 +                               return ret;
12                         ret = ext4_jbd2_file_inode(handle, inode);
13                         if (ret)
14                                 return ret;
15 @@ -2503,6 +2506,9 @@ static int ext4_writepages(struct addres
16                 mpd.last_page = wbc->range_end >> PAGE_CACHE_SHIFT;
17         }
18  
19 +       ret = ext4_inode_attach_jinode(inode);
20 +       if (ret)
21 +               goto out_writepages;
22         mpd.inode = inode;
23         mpd.wbc = wbc;
24         ext4_io_submit_init(&mpd.io_submit, wbc);
25 @@ -3837,6 +3843,7 @@ int ext4_inode_attach_jinode(struct inod
26                 jbd2_free_inode(jinode);
27         return 0;
28  }
29 +EXPORT_SYMBOL(ext4_inode_attach_jinode);
30  
31  /*
32   * ext4_truncate()
33 Index: linux-stage/fs/ext4/ext4.h
34 ===================================================================
35 --- linux-stage.orig/fs/ext4/ext4.h
36 +++ linux-stage/fs/ext4/ext4.h
37 @@ -2379,6 +2379,7 @@ extern int ext4_group_add_blocks(handle_
38  extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
39  
40  /* inode.c */
41 +#define HAVE_LDISKFS_INFO_JINODE
42  struct buffer_head *ext4_getblk(handle_t *, struct inode *,
43                                                 ext4_lblk_t, int, int *);
44  struct buffer_head *ext4_bread(handle_t *, struct inode *,