Commit 0d0b8646 authored by Al Viro's avatar Al Viro

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: 516b97cf "ufs: Convert directory handling to kmap_local"
Acked-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 9852d85e
......@@ -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;
......
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