[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190417001041.GA18090@gmail.com>
Date: Tue, 16 Apr 2019 17:10:42 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Theodore Ts'o <tytso@....edu>
Cc: linux-fscrypt@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-mtd@...ts.infradead.org, linux-unionfs@...r.kernel.org,
Sarthak Kukreti <sarthakkukreti@...omium.org>,
Gao Xiang <gaoxiang25@...wei.com>
Subject: Re: [PATCH v2 1/5] fscrypt: clean up and improve dentry revalidation
On Tue, Apr 16, 2019 at 07:08:40PM -0400, Theodore Ts'o wrote:
> On Wed, Mar 20, 2019 at 11:39:09AM -0700, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@...gle.com>
> >
> > Make various improvements to fscrypt dentry revalidation:
> >
> > - Don't try to handle the case where the per-directory key is removed,
> > as this can't happen without the inode (and dentries) being evicted.
> >
> > - Flag ciphertext dentries rather than plaintext dentries, since it's
> > ciphertext dentries that need the special handling.
> >
> > - Avoid doing unnecessary work for non-ciphertext dentries.
> >
> > - When revalidating ciphertext dentries, try to set up the directory's
> > i_crypt_info to make sure the key is really still absent, rather than
> > invalidating all negative dentries as the previous code did. An old
> > comment suggested we can't do this for locking reasons, but AFAICT
> > this comment was outdated and it actually works fine.
> >
> > Signed-off-by: Eric Biggers <ebiggers@...gle.com>
>
> Looks good, applied.
>
> - Ted
Hi Ted, I assumed you resolved the conflict with "fscrypt: use READ_ONCE() to
access ->i_crypt_info"? The code in fscrypt_d_revalidate() should be:
dir = dget_parent(dentry);
err = fscrypt_get_encryption_info(d_inode(dir));
valid = !fscrypt_has_encryption_key(d_inode(dir));
dput(dir);
- Eric
Powered by blists - more mailing lists