1 From 01da8ce642e08594db95d940b3352ad7ee153b09 Mon Sep 17 00:00:00 2001
2 From: Shaun Tancheff <stancheff@cray.com>
3 Date: Tue, 6 Aug 2019 17:11:57 -0500
4 Subject: [PATCH] + linux-5.3/ext4-attach-jinode-in-writepages
8 fs/ext4/inode.c | 8 ++++++++
9 2 files changed, 9 insertions(+)
11 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
12 index 65c02d6..f28104a 100644
15 @@ -2672,6 +2672,7 @@ extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
16 extern void ext4_process_freed_data(struct super_block *sb, tid_t commit_tid);
19 +#define HAVE_LDISKFS_INFO_JINODE
20 int ext4_inode_is_fast_symlink(struct inode *inode);
21 struct buffer_head *ext4_getblk(handle_t *, struct inode *, ext4_lblk_t, int);
22 struct buffer_head *ext4_bread(handle_t *, struct inode *, ext4_lblk_t, int);
23 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
24 index 434b256..0fd5f4e 100644
27 @@ -735,6 +735,10 @@ out_sem:
28 (loff_t)map->m_lblk << inode->i_blkbits;
29 loff_t length = (loff_t)map->m_len << inode->i_blkbits;
31 + ret = ext4_inode_attach_jinode(inode);
35 if (flags & EXT4_GET_BLOCKS_IO_SUBMIT)
36 ret = ext4_jbd2_inode_add_wait(handle, inode,
38 @@ -2829,6 +2833,9 @@ static int ext4_writepages(struct address_space *mapping,
39 mpd.last_page = wbc->range_end >> PAGE_SHIFT;
42 + ret = ext4_inode_attach_jinode(inode);
44 + goto out_writepages;
47 ext4_io_submit_init(&mpd.io_submit, wbc);
48 @@ -4446,6 +4453,7 @@ int ext4_inode_attach_jinode(struct inode *inode)
49 jbd2_free_inode(jinode);
52 +EXPORT_SYMBOL(ext4_inode_attach_jinode);