[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210202152255.GA3383@jeffrey-work-20.04>
Date: Tue, 2 Feb 2021 09:22:55 -0600
From: Jeffrey Mitchell <jeffrey.mitchell@...rlab.io>
To: Tyler Hicks <code@...icks.com>
Cc: ecryptfs@...r.kernel.org, linux-kernel@...r.kernel.org,
Dan Robertson <daniel.robertson@...rlab.io>
Subject: Re: [PATCH] ecryptfs: Fix inodes not being evicted until unmount
On Sat, Jan 30, 2021 at 11:06:40AM -0600, Tyler Hicks wrote:
> Hey Jeffrey and Dan - thanks for the patch! Unfortunately, I think this
> would allow the eCryptfs inode's nlink count to get out of sync with the
> lower inode's nlink count in the case of direct manipulation to the
> lower filesystem.
Hmm. What if I instead synchronize it before calling vfs_unlink(), then
call drop_nlink() if vfs_unlink() succeeds?
> Is the condition that you're trying to fix a result of going through the
> this code path?
>
> ecryptfs_unlink() -> ecryptfs_do_unlink() -> vfs_unlink() -> nfs_unlink() -> nfs_sillyrename() -> nfs_async_unlink()
Yes, that is the code path that causes it.
V/R,
Jeffrey Mitchell
Powered by blists - more mailing lists