[06/22] ext4: Use ext4_journal_extend() instead of jbd2_journal_extend()
diff mbox series

Message ID 20191003220613.10791-6-jack@suse.cz
State Superseded
Headers show
Series
  • ext4: Fix transaction overflow due to revoke descriptors
Related show

Commit Message

Jan Kara Oct. 3, 2019, 10:05 p.m. UTC
Use ext4 helper ext4_journal_extend() instead of opencoding it in
ext4_try_to_expand_extra_isize().

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Theodore Y. Ts'o Oct. 21, 2019, 1:39 a.m. UTC | #1
On Fri, Oct 04, 2019 at 12:05:52AM +0200, Jan Kara wrote:
> Use ext4 helper ext4_journal_extend() instead of opencoding it in
> ext4_try_to_expand_extra_isize().
> 
> Signed-off-by: Jan Kara <jack@suse.cz>

Looks good; you can add:

Reviewed-by: Theodore Ts'o <tytso@mit.edu>

Patch
diff mbox series

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index e6b631d50c26..042d23a81f44 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5970,8 +5970,7 @@  static int ext4_try_to_expand_extra_isize(struct inode *inode,
 	 * If this is felt to be critical, then e2fsck should be run to
 	 * force a large enough s_min_extra_isize.
 	 */
-	if (ext4_handle_valid(handle) &&
-	    jbd2_journal_extend(handle,
+	if (ext4_journal_extend(handle,
 				EXT4_DATA_TRANS_BLOCKS(inode->i_sb)) != 0)
 		return -ENOSPC;