summaryrefslogtreecommitdiff
path: root/fs/internal.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2024-02-18 14:50:13 +0100
committerChristian Brauner <brauner@kernel.org>2024-03-01 12:23:44 +0100
commit07fd7c329839cf0b8c7766883d830a1a0d12d1dd (patch)
treea12a4d6447b3b602d7a8f28019d27d18019c21dd /fs/internal.h
parentcb12fd8e0dabb9a1c8aef55a6a41e2c255fcdf4b (diff)
libfs: add path_from_stashed()
Add a helper for both nsfs and pidfs to reuse an already stashed dentry or to add and stash a new dentry. Link: https://lore.kernel.org/r/20240218-neufahrzeuge-brauhaus-fb0eb6459771@brauner Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/internal.h')
-rw-r--r--fs/internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/internal.h b/fs/internal.h
index b67406435fc0..cfddaec6fbf6 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -310,3 +310,6 @@ ssize_t __kernel_write_iter(struct file *file, struct iov_iter *from, loff_t *po
struct mnt_idmap *alloc_mnt_idmap(struct user_namespace *mnt_userns);
struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap);
void mnt_idmap_put(struct mnt_idmap *idmap);
+int path_from_stashed(struct dentry **stashed, unsigned long ino,
+ struct vfsmount *mnt, const struct file_operations *fops,
+ void *data, struct path *path);