From: Christoph Hellwig <hch@lst.de>
To: akpm@linux-foundation.org
Cc: code@tyhicks.com, ecryptfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: [PATCH] ecryptfs: add a ->set_page_dirty cludge
Date: Thu, 24 Jun 2021 14:52:50 +0200 [thread overview]
Message-ID: <20210624125250.536369-1-hch@lst.de> (raw)
"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
next reply other threads:[~2021-06-24 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 12:52 Christoph Hellwig [this message]
2021-06-24 13:07 ` [PATCH] ecryptfs: add a ->set_page_dirty cludge Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210624125250.536369-1-hch@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=code@tyhicks.com \
--cc=ecryptfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox