linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Decomplicate file_dentry()
@ 2024-02-02 11:01 Amir Goldstein
  2024-02-02 11:01 ` [PATCH 1/2] fs: make file_dentry() a simple accessor Amir Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Amir Goldstein @ 2024-02-02 11:01 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Al Viro, Christian Brauner, Stefan Berger, Mimi Zohar,
	linux-unionfs, linux-integrity, linux-fsdevel

Miklos,

When posting the patches for file_user_path(), I wrote [1]:

"This change already makes file_dentry() moot, but for now we did not
 change this helper just added a WARN_ON() in ovl_d_real() to catch if we
 have made any wrong assumptions.

 After the dust settles on this change, we can make file_dentry() a plain
 accessor and we can drop the inode argument to ->d_real()."

I was going to follow your suggestion and make this change to ->d_real(),
but a recent discussion on EVM signature verification on overlay files [2]
raised the need to get the real metacopy inode instead of the real data
inode.

So instead of removing the inode argument, I replaced it with a type.
Currently, type can take D_REAL_{DATA,METADATA}, but in the future,
if the need arises, it could grow other types like D_REAL_{UPPER,LOWER}.

Please let me know what you think of the proposed API.

This work is destined to be a pull request to Christian's vfs tree,
unless someone has any objections to this route.

Thanks,
Amir.

[1] https://lore.kernel.org/r/20231009153712.1566422-1-amir73il@gmail.com/
[2] https://lore.kernel.org/r/20240130214620.3155380-5-stefanb@linux.ibm.com/

Amir Goldstein (2):
  fs: make file_dentry() a simple accessor
  fs: remove the inode argument to ->d_real() method

 Documentation/filesystems/locking.rst |  2 +-
 Documentation/filesystems/vfs.rst     | 16 ++++-----
 fs/overlayfs/super.c                  | 52 ++++++++++++---------------
 include/linux/dcache.h                | 18 ++++++----
 include/linux/fs.h                    | 13 ++++++-
 5 files changed, 53 insertions(+), 48 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-02-06 16:02 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 11:01 [PATCH 0/2] Decomplicate file_dentry() Amir Goldstein
2024-02-02 11:01 ` [PATCH 1/2] fs: make file_dentry() a simple accessor Amir Goldstein
2024-02-02 15:16   ` Stefan Berger
2024-02-02 11:01 ` [PATCH 2/2] fs: remove the inode argument to ->d_real() method Amir Goldstein
2024-02-02 12:19   ` Miklos Szeredi
2024-02-02 12:41     ` Amir Goldstein
2024-02-02 13:54       ` Christian Brauner
2024-02-06 15:28         ` Amir Goldstein
2024-02-02 15:17   ` Stefan Berger
2024-02-02 16:05   ` Al Viro
2024-02-02 16:16     ` Al Viro
2024-02-02 17:34       ` Stefan Berger
2024-02-02 18:27         ` Al Viro
2024-02-02 18:32           ` Stefan Berger
2024-02-02 18:50             ` Al Viro
2024-02-02 18:38           ` Al Viro
2024-02-06 16:02 ` [PATCH 0/2] Decomplicate file_dentry() Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).