mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user