Skip to content

Commit 4522ae2

Browse files
committed
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
2 parents ff7dcfe + 99dbb2a commit 4522ae2

File tree

3 files changed

+7
-31
lines changed

3 files changed

+7
-31
lines changed

drivers/mtd/ubi/kapi.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -791,33 +791,6 @@ int ubi_sync(int ubi_num)
791791
}
792792
EXPORT_SYMBOL_GPL(ubi_sync);
793793

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-
821794
BLOCKING_NOTIFIER_HEAD(ubi_notifiers);
822795

823796
/**

fs/ubifs/file.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,7 @@ static int do_writepage(struct folio *folio, size_t len)
979979
* on the page lock and it would not write the truncated inode node to the
980980
* journal before we have finished.
981981
*/
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)
984983
{
985984
struct inode *inode = folio->mapping->host;
986985
struct ubifs_info *c = inode->i_sb->s_fs_info;
@@ -1052,7 +1051,12 @@ static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc,
10521051
static int ubifs_writepages(struct address_space *mapping,
10531052
struct writeback_control *wbc)
10541053
{
1055-
return write_cache_pages(mapping, wbc, ubifs_writepage, NULL);
1054+
struct folio *folio = NULL;
1055+
int error;
1056+
1057+
while ((folio = writeback_iter(mapping, wbc, folio, &error)))
1058+
error = ubifs_writepage(folio, wbc);
1059+
return error;
10561060
}
10571061

10581062
/**

include/linux/mtd/ubi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum);
250250
int ubi_leb_map(struct ubi_volume_desc *desc, int lnum);
251251
int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum);
252252
int ubi_sync(int ubi_num);
253-
int ubi_flush(int ubi_num, int vol_id, int lnum);
254253

255254
/*
256255
* This function is the same as the 'ubi_leb_read()' function, but it does not

0 commit comments

Comments
 (0)