]> Gentwo Git Trees - linux/.git/commit
ecryptfs: get rid of pointless mount references in ecryptfs dentries
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Jul 2025 02:45:09 +0000 (22:45 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Sep 2025 01:26:44 +0000 (21:26 -0400)
commitfc812c40f5eeee81836eabc3cdd017a46fe39d4c
tree806dae55f4cbd8cd88902bad2d27ccc57373cfc9
parent75db7fd99075bf46f3bfeaa8f1aaa8b13b2590cf
ecryptfs: get rid of pointless mount references in ecryptfs dentries

->lower_path.mnt has the same value for all dentries on given ecryptfs
instance and if somebody goes for mountpoint-crossing variant where that
would not be true, we can deal with that when it happens (and _not_
with duplicating these reference into each dentry).

As it is, we are better off just sticking a reference into ecryptfs-private
part of superblock and keeping it pinned until ->kill_sb().

That way we can stick a reference to underlying dentry right into ->d_fsdata
of ecryptfs one, getting rid of indirection through struct ecryptfs_dentry_info,
along with the entire struct ecryptfs_dentry_info machinery.

[kudos to Dan Carpenter for spotting a bug in ecryptfs_get_tree() part]

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ecryptfs/dentry.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/file.c
fs/ecryptfs/inode.c
fs/ecryptfs/main.c