* [PATCH] ecryptfs: add a ->set_page_dirty cludge
@ 2021-06-24 12:52 Christoph Hellwig
2021-06-24 13:07 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2021-06-24 12:52 UTC (permalink / raw)
To: akpm; +Cc: code, ecryptfs, linux-fsdevel
"fix" ecryptfs to work the same as before the recent change to the
behavior without a ->set_page_dirty method.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/ecryptfs/mmap.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index 392e721b50a3..7d85e64ea62f 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -533,7 +533,20 @@ static sector_t ecryptfs_bmap(struct address_space *mapping, sector_t block)
return block;
}
+#include <linux/buffer_head.h>
+
const struct address_space_operations ecryptfs_aops = {
+ /*
+ * XXX: This is pretty broken for multiple reasons: ecryptfs does not
+ * actually use buffer_heads, and ecryptfs will crash without
+ * CONFIG_BLOCK. But it matches the behavior before the default for
+ * address_space_operations without the ->set_page_dirty method was
+ * cleaned up, so this is the best we can do without maintainer
+ * feedback.
+ */
+#ifdef CONFIG_BLOCK
+ .set_page_dirty = __set_page_dirty_buffers,
+#endif
.writepage = ecryptfs_writepage,
.readpage = ecryptfs_readpage,
.write_begin = ecryptfs_write_begin,
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ecryptfs: add a ->set_page_dirty cludge
2021-06-24 12:52 [PATCH] ecryptfs: add a ->set_page_dirty cludge Christoph Hellwig
@ 2021-06-24 13:07 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2021-06-24 13:07 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: akpm, code, ecryptfs, linux-fsdevel
On Thu, Jun 24, 2021 at 02:52:50PM +0200, Christoph Hellwig wrote:
> "fix" ecryptfs to work the same as before the recent change to the
> behavior without a ->set_page_dirty method.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This is atrocious, but we can't really do better.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-24 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 12:52 [PATCH] ecryptfs: add a ->set_page_dirty cludge Christoph Hellwig
2021-06-24 13:07 ` Matthew Wilcox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.