summaryrefslogtreecommitdiff
path: root/fs/ufs/namei.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-08 18:01:47 -0400
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:31:53 +0200
commit516b97cf03dd630ad90c9329de312c755690650a (patch)
treef576152858981d55ae6ef0ab2d9e4204edac7f5d /fs/ufs/namei.c
parent0f3e63f30bf5ba214561e127a2c21c2d46ded141 (diff)
ufs: Convert directory handling to kmap_local
Remove kmap use and use folio_release_kmap() instead of ufs_put_page(). Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ufs/namei.c')
-rw-r--r--fs/ufs/namei.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index a9b0c15de067..24bd12186647 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -306,23 +306,18 @@ static int ufs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
if (dir_de) {
if (old_dir != new_dir)
ufs_set_link(old_inode, dir_de, dir_folio, new_dir, 0);
- else {
- kunmap(&dir_folio->page);
- folio_put(dir_folio);
- }
+ else
+ folio_release_kmap(dir_folio, new_dir);
inode_dec_link_count(old_dir);
}
return 0;
out_dir:
- if (dir_de) {
- kunmap(&dir_folio->page);
- folio_put(dir_folio);
- }
+ if (dir_de)
+ folio_release_kmap(dir_folio, dir_de);
out_old:
- kunmap(&old_folio->page);
- folio_put(old_folio);
+ folio_release_kmap(old_folio, old_de);
out:
return err;
}