71 lines
2.3 KiB
Diff
71 lines
2.3 KiB
Diff
|
From ed055b79a4503094656f19455a847fc9ae2fa799 Mon Sep 17 00:00:00 2001
|
||
|
From: nyyu <mail@nyyu.dev>
|
||
|
Date: Sun, 6 Oct 2024 18:15:55 +0200
|
||
|
Subject: [PATCH] fix: kernel 6.11
|
||
|
|
||
|
---
|
||
|
fs/bcachefs/fs-io-buffered.c | 8 +++++---
|
||
|
fs/bcachefs/fs-io-buffered.h | 4 ++--
|
||
|
2 files changed, 7 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/fs/bcachefs/fs-io-buffered.c b/fs/bcachefs/fs-io-buffered.c
|
||
|
index 48a1ab9..2f96017 100644
|
||
|
--- a/fs/bcachefs/fs-io-buffered.c
|
||
|
+++ b/fs/bcachefs/fs-io-buffered.c
|
||
|
@@ -648,7 +648,7 @@ int bch2_writepages(struct address_space *mapping, struct writeback_control *wbc
|
||
|
|
||
|
int bch2_write_begin(struct file *file, struct address_space *mapping,
|
||
|
loff_t pos, unsigned len,
|
||
|
- struct folio **foliop, void **fsdata)
|
||
|
+ struct page **pagep, void **fsdata)
|
||
|
{
|
||
|
struct bch_inode_info *inode = to_bch_ei(mapping->host);
|
||
|
struct bch_fs *c = inode->v.i_sb->s_fs_info;
|
||
|
@@ -717,11 +717,12 @@ out:
|
||
|
goto err;
|
||
|
}
|
||
|
|
||
|
- *foliop = folio;
|
||
|
+ *pagep = &folio->page;
|
||
|
return 0;
|
||
|
err:
|
||
|
folio_unlock(folio);
|
||
|
folio_put(folio);
|
||
|
+ *pagep = NULL;
|
||
|
err_unlock:
|
||
|
bch2_pagecache_add_put(inode);
|
||
|
kfree(res);
|
||
|
@@ -731,11 +732,12 @@ err_unlock:
|
||
|
|
||
|
int bch2_write_end(struct file *file, struct address_space *mapping,
|
||
|
loff_t pos, unsigned len, unsigned copied,
|
||
|
- struct folio *folio, void *fsdata)
|
||
|
+ struct page *page, void *fsdata)
|
||
|
{
|
||
|
struct bch_inode_info *inode = to_bch_ei(mapping->host);
|
||
|
struct bch_fs *c = inode->v.i_sb->s_fs_info;
|
||
|
struct bch2_folio_reservation *res = fsdata;
|
||
|
+ struct folio *folio = page_folio(page);
|
||
|
unsigned offset = pos - folio_pos(folio);
|
||
|
|
||
|
lockdep_assert_held(&inode->v.i_rwsem);
|
||
|
diff --git a/fs/bcachefs/fs-io-buffered.h b/fs/bcachefs/fs-io-buffered.h
|
||
|
index 3207ebb..40ce76c 100644
|
||
|
--- a/fs/bcachefs/fs-io-buffered.h
|
||
|
+++ b/fs/bcachefs/fs-io-buffered.h
|
||
|
@@ -11,9 +11,9 @@ int bch2_writepages(struct address_space *, struct writeback_control *);
|
||
|
void bch2_readahead(struct readahead_control *);
|
||
|
|
||
|
int bch2_write_begin(struct file *, struct address_space *, loff_t pos,
|
||
|
- unsigned len, struct folio **, void **);
|
||
|
+ unsigned len, struct page **, void **);
|
||
|
int bch2_write_end(struct file *, struct address_space *, loff_t,
|
||
|
- unsigned len, unsigned copied, struct folio *, void *);
|
||
|
+ unsigned len, unsigned copied, struct page *, void *);
|
||
|
|
||
|
ssize_t bch2_write_iter(struct kiocb *, struct iov_iter *);
|
||
|
|
||
|
--
|
||
|
2.46.2
|
||
|
|