[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zx-ndBo7wpYSHWPK@casper.infradead.org>
Date: Mon, 28 Oct 2024 15:02:12 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Tyler Hicks <code@...icks.com>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
Arnd Bergmann <arnd@...db.de>, ecryptfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: ecryptfs is unmaintained and untested
On Mon, Oct 28, 2024 at 02:18:45PM +0000, Arnd Bergmann wrote:
> The ecryptfs file system uses functions from fs/buffer.c that
> are only available when CONFIG_BUFFER_HEAD is enabled:
>
> ld.lld-20: error: undefined symbol: block_dirty_folio
> >>> vmlinux.o:(ecryptfs_aops)
> ld.lld-20: error: undefined symbol: block_invalidate_folio
> >>> vmlinux.o:(ecryptfs_aops)
>
> When CONFIG_BLOCK is turned off completely, this is not needed,
> so add a conditional 'select BUFFER_HEAD'.
The comment says it doesn't work without CONFIG_BLOCK:
/*
* 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 ->dirty_folio method was
* cleaned up, so this is the best we can do without maintainer
* feedback.
This comment has been there since June 2021, so I think we can just
delete ecryptfs now?
If we can't delete it for some reason, I think we can use
filemap_dirty_folio() and remove the setting of invalidate_folio()
as block_invalidate_folio() is a no-op if there are no folio_buffers.
ie this in lieu of your patch:
+++ b/fs/ecryptfs/mmap.c
@@ -514,17 +514,9 @@ static sector_t ecryptfs_bmap(struct address_space *mapping, sector_t block)
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 ->dirty_folio method was
- * cleaned up, so this is the best we can do without maintainer
- * feedback.
+ * XXX: This entire filesystem is unmaintained and untested.
*/
-#ifdef CONFIG_BLOCK
- .dirty_folio = block_dirty_folio,
- .invalidate_folio = block_invalidate_folio,
-#endif
+ .dirty_folio = filemap_dirty_folio,
.writepages = ecryptfs_writepages,
.read_folio = ecryptfs_read_folio,
.write_begin = ecryptfs_write_begin,
Powered by blists - more mailing lists