aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inline.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index bae987549dc3..ed6e71fe5e9d 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -849,11 +849,13 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
849 handle_t *handle; 849 handle_t *handle;
850 struct page *page; 850 struct page *page;
851 struct ext4_iloc iloc; 851 struct ext4_iloc iloc;
852 int retries;
852 853
853 ret = ext4_get_inode_loc(inode, &iloc); 854 ret = ext4_get_inode_loc(inode, &iloc);
854 if (ret) 855 if (ret)
855 return ret; 856 return ret;
856 857
858retry_journal:
857 handle = ext4_journal_start(inode, EXT4_HT_INODE, 1); 859 handle = ext4_journal_start(inode, EXT4_HT_INODE, 1);
858 if (IS_ERR(handle)) { 860 if (IS_ERR(handle)) {
859 ret = PTR_ERR(handle); 861 ret = PTR_ERR(handle);
@@ -875,6 +877,11 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
875 inode, 877 inode,
876 flags, 878 flags,
877 fsdata); 879 fsdata);
880 ext4_journal_stop(handle);
881 handle = NULL;
882 if (ret == -ENOSPC &&
883 ext4_should_retry_alloc(inode->i_sb, &retries))
884 goto retry_journal;
878 goto out; 885 goto out;
879 } 886 }
880 887