aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/extents.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 3e966daaadee..17ea8bb12aa5 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -92,17 +92,16 @@ static void ext4_idx_store_pblock(struct ext4_extent_idx *ix, ext4_fsblk_t pb)
92 ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff); 92 ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & 0xffff);
93} 93}
94 94
95static handle_t *ext4_ext_journal_restart(handle_t *handle, int needed) 95static int ext4_ext_journal_restart(handle_t *handle, int needed)
96{ 96{
97 int err; 97 int err;
98 98
99 if (handle->h_buffer_credits > needed) 99 if (handle->h_buffer_credits > needed)
100 return handle; 100 return 0;
101 if (!ext4_journal_extend(handle, needed)) 101 err = ext4_journal_extend(handle, needed);
102 return handle; 102 if (err)
103 err = ext4_journal_restart(handle, needed); 103 return err;
104 104 return ext4_journal_restart(handle, needed);
105 return handle;
106} 105}
107 106
108/* 107/*
@@ -1888,11 +1887,9 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
1888 credits += 2 * EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb); 1887 credits += 2 * EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb);
1889#endif 1888#endif
1890 1889
1891 handle = ext4_ext_journal_restart(handle, credits); 1890 err = ext4_ext_journal_restart(handle, credits);
1892 if (IS_ERR(handle)) { 1891 if (err)
1893 err = PTR_ERR(handle);
1894 goto out; 1892 goto out;
1895 }
1896 1893
1897 err = ext4_ext_get_access(handle, inode, path + depth); 1894 err = ext4_ext_get_access(handle, inode, path + depth);
1898 if (err) 1895 if (err)