On Mon, 2021-04-19 at 11:09 +0100, Luis Henriques wrote: > Hi Jeff! > > Jeff Layton <jlayton@xxxxxxxxxx> writes: > <...> > > + > > + case FS_IOC_ADD_ENCRYPTION_KEY: > > + ret = vet_mds_for_fscrypt(file); > > + if (ret) > > + return ret; > > + atomic_inc(&ci->i_shared_gen); > > After spending some (well... a lot, actually) time looking at the MDS code > to try to figure out my bug, I'm back at this point in the kernel client > code. I understand that this code is trying to invalidate the directory > dentries here. However, I just found that the directory we get at this > point is the filesystem root directory, and not the directory we're trying > to unlock. > > So, I still don't fully understand the issue I'm seeing, but I believe the > code above is assuming 'ci' is the inode being unlocked, which isn't > correct. > > (Note: I haven't checked if there are other ioctls getting the FS root.) > > Cheers, Oh, interesting. That was my assumption. I'll have to take a look more closely at what effect that might have then. Thanks, -- Jeff Layton <jlayton@xxxxxxxxxx>