@@ -66,7 +66,7 @@ static int ufs_handle_dirsync(struct inode *dir)
return err;
}
-static inline void ufs_put_page(struct page *page)
+inline void ufs_put_page(struct page *page)
{
kunmap(page);
put_page(page);
@@ -307,8 +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_page, new_dir, 0);
else {
- kunmap(dir_page);
- put_page(dir_page);
+ ufs_put_page(dir_page);
}
inode_dec_link_count(old_dir);
}
@@ -317,12 +316,10 @@ static int ufs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
out_dir:
if (dir_de) {
- kunmap(dir_page);
- put_page(dir_page);
+ ufs_put_page(dir_page);
}
out_old:
- kunmap(old_page);
- put_page(old_page);
+ ufs_put_page(old_page);
out:
return err;
}
@@ -98,6 +98,7 @@ extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, uns
extern void ufs_put_cylinder (struct super_block *, unsigned);
/* dir.c */
+extern void ufs_put_page(struct page *page);
extern const struct inode_operations ufs_dir_inode_operations;
extern int ufs_add_link (struct dentry *, struct inode *);
extern ino_t ufs_inode_by_name(struct inode *, const struct qstr *);