summaryrefslogtreecommitdiffstats
path: root/samples/kmemleak
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2023-10-09 17:37:12 +0200
committerChristian Brauner <brauner@kernel.org>2023-10-19 11:03:15 +0200
commitdef3ae83da02f87005210fa3d448c5dd37ba4105 (patch)
tree3205fda67f49682217cef7e8d09b79a590294a69 /samples/kmemleak
parentfs: create helper file_user_path() for user displayed mapped file path (diff)
downloadlinux-def3ae83da02f87005210fa3d448c5dd37ba4105.tar.xz
linux-def3ae83da02f87005210fa3d448c5dd37ba4105.zip
fs: store real path instead of fake path in backing file f_path
A backing file struct stores two path's, one "real" path that is referring to f_inode and one "fake" path, which should be displayed to users in /proc/<pid>/maps. There is a lot more potential code that needs to know the "real" path, then code that needs to know the "fake" path. Instead of code having to request the "real" path with file_real_path(), store the "real" path in f_path and require code that needs to know the "fake" path request it with file_user_path(). Replace the file_real_path() helper with a simple const accessor f_path(). After this change, file_dentry() is not expected to observe any files with overlayfs f_path and real f_inode, so the call to ->d_real() should not be needed. Leave the ->d_real() call for now and add an assertion in ovl_d_real() to catch if we made wrong assumptions. Suggested-by: Miklos Szeredi <miklos@szeredi.hu> Link: https://lore.kernel.org/r/CAJfpegtt48eXhhjDFA1ojcHPNKj3Go6joryCPtEFAKpocyBsnw@mail.gmail.com/ Signed-off-by: Amir Goldstein <amir73il@gmail.com> Link: https://lore.kernel.org/r/20231009153712.1566422-4-amir73il@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'samples/kmemleak')
0 files changed, 0 insertions, 0 deletions