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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ubifs-for-linus-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs

Pull UBI and UBIFS updates from Richard Weinberger:
"UBIFS:
- No longer use write_cache_pages()

UBI:
- Remove an unused function"

* tag 'ubifs-for-linus-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
ubifs: stop using write_cache_pages
mtd: ubi: Remove unused ubi_flush

+7 -31
-27
drivers/mtd/ubi/kapi.c
··· 791 791 } 792 792 EXPORT_SYMBOL_GPL(ubi_sync); 793 793 794 - /** 795 - * ubi_flush - flush UBI work queue. 796 - * @ubi_num: UBI device to flush work queue 797 - * @vol_id: volume id to flush for 798 - * @lnum: logical eraseblock number to flush for 799 - * 800 - * This function executes all pending works for a particular volume id / logical 801 - * eraseblock number pair. If either value is set to %UBI_ALL, then it acts as 802 - * a wildcard for all of the corresponding volume numbers or logical 803 - * eraseblock numbers. It returns zero in case of success and a negative error 804 - * code in case of failure. 805 - */ 806 - int ubi_flush(int ubi_num, int vol_id, int lnum) 807 - { 808 - struct ubi_device *ubi; 809 - int err = 0; 810 - 811 - ubi = ubi_get_device(ubi_num); 812 - if (!ubi) 813 - return -ENODEV; 814 - 815 - err = ubi_wl_flush(ubi, vol_id, lnum); 816 - ubi_put_device(ubi); 817 - return err; 818 - } 819 - EXPORT_SYMBOL_GPL(ubi_flush); 820 - 821 794 BLOCKING_NOTIFIER_HEAD(ubi_notifiers); 822 795 823 796 /**
+7 -3
fs/ubifs/file.c
··· 979 979 * on the page lock and it would not write the truncated inode node to the 980 980 * journal before we have finished. 981 981 */ 982 - static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc, 983 - void *data) 982 + static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc) 984 983 { 985 984 struct inode *inode = folio->mapping->host; 986 985 struct ubifs_info *c = inode->i_sb->s_fs_info; ··· 1051 1052 static int ubifs_writepages(struct address_space *mapping, 1052 1053 struct writeback_control *wbc) 1053 1054 { 1054 - return write_cache_pages(mapping, wbc, ubifs_writepage, NULL); 1055 + struct folio *folio = NULL; 1056 + int error; 1057 + 1058 + while ((folio = writeback_iter(mapping, wbc, folio, &error))) 1059 + error = ubifs_writepage(folio, wbc); 1060 + return error; 1055 1061 } 1056 1062 1057 1063 /**
-1
include/linux/mtd/ubi.h
··· 250 250 int ubi_leb_map(struct ubi_volume_desc *desc, int lnum); 251 251 int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum); 252 252 int ubi_sync(int ubi_num); 253 - int ubi_flush(int ubi_num, int vol_id, int lnum); 254 253 255 254 /* 256 255 * This function is the same as the 'ubi_leb_read()' function, but it does not