Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

f2fs: Pass a folio to __f2fs_setxattr()

Also pass the folio into read_all_xattrs().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Matthew Wilcox (Oracle) and committed by
Jaegeuk Kim
b3955efb 953ab314

+6 -6
+6 -6
fs/f2fs/xattr.c
··· 385 385 return err; 386 386 } 387 387 388 - static int read_all_xattrs(struct inode *inode, struct page *ipage, 388 + static int read_all_xattrs(struct inode *inode, struct folio *ifolio, 389 389 void **base_addr) 390 390 { 391 391 struct f2fs_xattr_header *header; ··· 402 402 403 403 /* read from inline xattr */ 404 404 if (inline_size) { 405 - err = read_inline_xattr(inode, ipage, txattr_addr); 405 + err = read_inline_xattr(inode, &ifolio->page, txattr_addr); 406 406 if (err) 407 407 goto fail; 408 408 } ··· 627 627 628 628 static int __f2fs_setxattr(struct inode *inode, int index, 629 629 const char *name, const void *value, size_t size, 630 - struct page *ipage, int flags) 630 + struct folio *ifolio, int flags) 631 631 { 632 632 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); 633 633 struct f2fs_xattr_entry *here, *last; ··· 651 651 if (size > MAX_VALUE_LEN(inode)) 652 652 return -E2BIG; 653 653 retry: 654 - error = read_all_xattrs(inode, ipage, &base_addr); 654 + error = read_all_xattrs(inode, ifolio, &base_addr); 655 655 if (error) 656 656 return error; 657 657 ··· 766 766 *(u32 *)((u8 *)last + newsize) = 0; 767 767 } 768 768 769 - error = write_all_xattrs(inode, new_hsize, base_addr, ipage); 769 + error = write_all_xattrs(inode, new_hsize, base_addr, &ifolio->page); 770 770 if (error) 771 771 goto exit; 772 772 ··· 817 817 /* this case is only from f2fs_init_inode_metadata */ 818 818 if (ifolio) 819 819 return __f2fs_setxattr(inode, index, name, value, 820 - size, &ifolio->page, flags); 820 + size, ifolio, flags); 821 821 f2fs_balance_fs(sbi, true); 822 822 823 823 f2fs_lock_op(sbi);