Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58e674d6 authored by Gu Zheng's avatar Gu Zheng Committed by Jaegeuk Kim
Browse files

f2fs: convert remove_inode_page to void

parent 1ff7bd3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1049,7 +1049,7 @@ int get_dnode_of_data(struct dnode_of_data *, pgoff_t, int);
int truncate_inode_blocks(struct inode *, pgoff_t);
int truncate_xattr_node(struct inode *, struct page *);
int wait_on_node_pages_writeback(struct f2fs_sb_info *, nid_t);
int remove_inode_page(struct inode *);
void remove_inode_page(struct inode *);
struct page *new_inode_page(struct inode *, const struct qstr *);
struct page *new_node_page(struct dnode_of_data *, unsigned int, struct page *);
void ra_node_page(struct f2fs_sb_info *, nid_t);
+4 −8
Original line number Diff line number Diff line
@@ -803,29 +803,25 @@ int truncate_xattr_node(struct inode *inode, struct page *page)
 * Caller should grab and release a mutex by calling mutex_lock_op() and
 * mutex_unlock_op().
 */
int remove_inode_page(struct inode *inode)
void remove_inode_page(struct inode *inode)
{
	struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
	struct page *page;
	nid_t ino = inode->i_ino;
	struct dnode_of_data dn;
	int err;

	page = get_node_page(sbi, ino);
	if (IS_ERR(page))
		return PTR_ERR(page);
		return;

	err = truncate_xattr_node(inode, page);
	if (err) {
	if (truncate_xattr_node(inode, page)) {
		f2fs_put_page(page, 1);
		return err;
		return;
	}

	/* 0 is possible, after f2fs_new_inode() is failed */
	f2fs_bug_on(inode->i_blocks != 0 && inode->i_blocks != 1);
	set_new_dnode(&dn, inode, page, page, ino);
	truncate_node(&dn);
	return 0;
}

struct page *new_inode_page(struct inode *inode, const struct qstr *name)