f2fs: remove obsolete pointer for truncate_xattr_node
This patch removes obosolete parameter for truncate_xattr_node. Suggested-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
032a690682
commit
5f5f593222
3 changed files with 6 additions and 8 deletions
|
@ -2592,7 +2592,7 @@ void get_node_info(struct f2fs_sb_info *sbi, nid_t nid, struct node_info *ni);
|
||||||
pgoff_t get_next_page_offset(struct dnode_of_data *dn, pgoff_t pgofs);
|
pgoff_t get_next_page_offset(struct dnode_of_data *dn, pgoff_t pgofs);
|
||||||
int get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode);
|
int get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode);
|
||||||
int truncate_inode_blocks(struct inode *inode, pgoff_t from);
|
int truncate_inode_blocks(struct inode *inode, pgoff_t from);
|
||||||
int truncate_xattr_node(struct inode *inode, struct page *page);
|
int truncate_xattr_node(struct inode *inode);
|
||||||
int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino);
|
int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino);
|
||||||
int remove_inode_page(struct inode *inode);
|
int remove_inode_page(struct inode *inode);
|
||||||
struct page *new_inode_page(struct inode *inode);
|
struct page *new_inode_page(struct inode *inode);
|
||||||
|
|
|
@ -962,7 +962,8 @@ fail:
|
||||||
return err > 0 ? 0 : err;
|
return err > 0 ? 0 : err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int truncate_xattr_node(struct inode *inode, struct page *page)
|
/* caller must lock inode page */
|
||||||
|
int truncate_xattr_node(struct inode *inode)
|
||||||
{
|
{
|
||||||
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
||||||
nid_t nid = F2FS_I(inode)->i_xattr_nid;
|
nid_t nid = F2FS_I(inode)->i_xattr_nid;
|
||||||
|
@ -978,10 +979,7 @@ int truncate_xattr_node(struct inode *inode, struct page *page)
|
||||||
|
|
||||||
f2fs_i_xnid_write(inode, 0);
|
f2fs_i_xnid_write(inode, 0);
|
||||||
|
|
||||||
set_new_dnode(&dn, inode, page, npage, nid);
|
set_new_dnode(&dn, inode, NULL, npage, nid);
|
||||||
|
|
||||||
if (page)
|
|
||||||
dn.inode_page_locked = true;
|
|
||||||
truncate_node(&dn);
|
truncate_node(&dn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1000,7 +998,7 @@ int remove_inode_page(struct inode *inode)
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = truncate_xattr_node(inode, dn.inode_page);
|
err = truncate_xattr_node(inode);
|
||||||
if (err) {
|
if (err) {
|
||||||
f2fs_put_dnode(&dn);
|
f2fs_put_dnode(&dn);
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -468,7 +468,7 @@ static inline int write_all_xattrs(struct inode *inode, __u32 hsize,
|
||||||
|
|
||||||
/* no need to use xattr node block */
|
/* no need to use xattr node block */
|
||||||
if (hsize <= inline_size) {
|
if (hsize <= inline_size) {
|
||||||
err = truncate_xattr_node(inode, ipage);
|
err = truncate_xattr_node(inode);
|
||||||
alloc_nid_failed(sbi, new_nid);
|
alloc_nid_failed(sbi, new_nid);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue