[Devel] [PATCH RHEL9 COMMIT] fs: Revert ee1904ba44bd "make alloc_file() static"

Konstantin Khorenko khorenko at virtuozzo.com
Thu Nov 28 20:03:44 MSK 2024


The commit is pushed to "branch-rh9-5.14.0-427.44.1.vz9.104.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.44.1.vz9.104.1
------>
commit cb0a0fecf8561e232b7334d29cf2328ec138f106
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Tue Oct 5 18:42:47 2021 +0300

    fs: Revert ee1904ba44bd "make alloc_file() static"
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    Feature: fs/ext4: fast online shrink support
---
 fs/file_table.c      | 3 ++-
 include/linux/file.h | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/file_table.c b/fs/file_table.c
index f780e165ac13..9431148bf1f6 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -221,7 +221,7 @@ struct file *alloc_empty_file_noaccount(int flags, const struct cred *cred)
  * @flags: O_... flags with which the new file will be opened
  * @fop: the 'struct file_operations' for the new file
  */
-static struct file *alloc_file(const struct path *path, int flags,
+struct file *alloc_file(const struct path *path, int flags,
 		const struct file_operations *fop)
 {
 	struct file *file;
@@ -249,6 +249,7 @@ static struct file *alloc_file(const struct path *path, int flags,
 		i_readcount_inc(path->dentry->d_inode);
 	return file;
 }
+EXPORT_SYMBOL(alloc_file);
 
 struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt,
 				const char *name, int flags,
diff --git a/include/linux/file.h b/include/linux/file.h
index 5a7095a4a28d..5f28fdb297e2 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -23,6 +23,8 @@ struct vfsmount;
 struct dentry;
 struct inode;
 struct path;
+extern struct file *alloc_file(const struct path *path, int flags,
+				const struct file_operations *fop);
 extern struct file *alloc_file_pseudo(struct inode *, struct vfsmount *,
 	const char *, int flags, const struct file_operations *);
 extern struct file *alloc_file_clone(struct file *, int flags,


More information about the Devel mailing list