Skip to content

Commit

Permalink
Merge tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/tytso/ext4

Pull ext4 fix from Ted Ts'o:
 "Fix a double unlock bug on an error path in ext4, found by smatch and
  syzkaller"

* tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix possible double unlock when moving a directory
  • Loading branch information
Linus Torvalds committed Mar 19, 2023
2 parents a3671bd + 70e42fe commit 995bba4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -3884,10 +3884,8 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir,
goto end_rename;
}
retval = ext4_rename_dir_prepare(handle, &old);
if (retval) {
inode_unlock(old.inode);
if (retval)
goto end_rename;
}
}
/*
* If we're renaming a file within an inline_data dir and adding or
Expand Down

0 comments on commit 995bba4

Please sign in to comment.