diff options
Diffstat (limited to 'fs/ext4/migrate.c')
-rw-r--r-- | fs/ext4/migrate.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 734abca25e35..fe64d9f79852 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c | |||
@@ -481,7 +481,7 @@ int ext4_ext_migrate(struct inode *inode) | |||
481 | + 1); | 481 | + 1); |
482 | if (IS_ERR(handle)) { | 482 | if (IS_ERR(handle)) { |
483 | retval = PTR_ERR(handle); | 483 | retval = PTR_ERR(handle); |
484 | goto err_out; | 484 | return retval; |
485 | } | 485 | } |
486 | tmp_inode = ext4_new_inode(handle, | 486 | tmp_inode = ext4_new_inode(handle, |
487 | inode->i_sb->s_root->d_inode, | 487 | inode->i_sb->s_root->d_inode, |
@@ -489,8 +489,7 @@ int ext4_ext_migrate(struct inode *inode) | |||
489 | if (IS_ERR(tmp_inode)) { | 489 | if (IS_ERR(tmp_inode)) { |
490 | retval = -ENOMEM; | 490 | retval = -ENOMEM; |
491 | ext4_journal_stop(handle); | 491 | ext4_journal_stop(handle); |
492 | tmp_inode = NULL; | 492 | return retval; |
493 | goto err_out; | ||
494 | } | 493 | } |
495 | i_size_write(tmp_inode, i_size_read(inode)); | 494 | i_size_write(tmp_inode, i_size_read(inode)); |
496 | /* | 495 | /* |
@@ -618,8 +617,7 @@ err_out: | |||
618 | 617 | ||
619 | ext4_journal_stop(handle); | 618 | ext4_journal_stop(handle); |
620 | 619 | ||
621 | if (tmp_inode) | 620 | iput(tmp_inode); |
622 | iput(tmp_inode); | ||
623 | 621 | ||
624 | return retval; | 622 | return retval; |
625 | } | 623 | } |