diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-10-02 17:19:46 +0300 |
---|---|---|
committer | Amir Goldstein <amir73il@gmail.com> | 2023-12-23 17:35:08 +0300 |
commit | f91a704f7161c2cf0fcd41fa9fbec4355b813fff (patch) | |
tree | c1af6faa09cad5d82be32ae5d76381cb79c4de19 /include | |
parent | d9e5d31084b024734e64307521414ef0ae1d5333 (diff) | |
download | linux-f91a704f7161c2cf0fcd41fa9fbec4355b813fff.tar.xz |
fs: prepare for stackable filesystems backing file helpers
In preparation for factoring out some backing file io helpers from
overlayfs, move backing_file_open() into a new file fs/backing-file.c
and header.
Add a MAINTAINERS entry for stackable filesystems and add a Kconfig
FS_STACK which stackable filesystems need to select.
For now, the backing_file struct, the backing_file alloc/free functions
and the backing_file_real_path() accessor remain internal to file_table.c.
We may change that in the future.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/backing-file.h | 17 | ||||
-rw-r--r-- | include/linux/fs.h | 3 |
2 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/backing-file.h b/include/linux/backing-file.h new file mode 100644 index 000000000000..55c9e804f780 --- /dev/null +++ b/include/linux/backing-file.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Common helpers for stackable filesystems and backing files. + * + * Copyright (C) 2023 CTERA Networks. + */ + +#ifndef _LINUX_BACKING_FILE_H +#define _LINUX_BACKING_FILE_H + +#include <linux/file.h> + +struct file *backing_file_open(const struct path *user_path, int flags, + const struct path *real_path, + const struct cred *cred); + +#endif /* _LINUX_BACKING_FILE_H */ diff --git a/include/linux/fs.h b/include/linux/fs.h index 900d0cd55b50..db5d07e6e02e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2575,9 +2575,6 @@ struct file *dentry_open(const struct path *path, int flags, const struct cred *creds); struct file *dentry_create(const struct path *path, int flags, umode_t mode, const struct cred *cred); -struct file *backing_file_open(const struct path *user_path, int flags, - const struct path *real_path, - const struct cred *cred); struct path *backing_file_user_path(struct file *f); /* |