1

ufs_rename(): fix bogus argument of folio_release_kmap()

new_dir does *NOT* point into dir_folio - it's an inode, not a pointer
to ufs directory entry.

Fixes: 516b97cf03 "ufs: Convert directory handling to kmap_local"
Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2024-10-01 23:28:49 -04:00
parent 9852d85ec9
commit 0d0b8646a6

View File

@ -307,7 +307,7 @@ static int ufs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
if (old_dir != new_dir)
ufs_set_link(old_inode, dir_de, dir_folio, new_dir, 0);
else
folio_release_kmap(dir_folio, new_dir);
folio_release_kmap(dir_folio, dir_de);
inode_dec_link_count(old_dir);
}
return 0;