Commit f9d58de2 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'affs-for-5.12-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull AFFS fix from David Sterba:
 "One minor fix for error handling in rename exchange"

* tag 'affs-for-5.12-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  fs/affs: release old buffer head on error path
parents d88e8b67 70779b89
......@@ -460,8 +460,10 @@ affs_xrename(struct inode *old_dir, struct dentry *old_dentry,
return -EIO;
bh_new = affs_bread(sb, d_inode(new_dentry)->i_ino);
if (!bh_new)
if (!bh_new) {
affs_brelse(bh_old);
return -EIO;
}
/* Remove old header from its parent directory. */
affs_lock_dir(old_dir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment