[RFC][PATCH 38/42] make alloc_file() static

From: Al Viro
Date: Tue Jul 10 2018 - 22:22:15 EST


From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
fs/file_table.c | 3 +--
include/linux/file.h | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/file_table.c b/fs/file_table.c
index 9097a6fb5a2f..c5f651fd6830 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -155,7 +155,7 @@ struct file *alloc_empty_file(const struct cred *cred)
* @mode: the mode with which the new file will be opened
* @fop: the 'struct file_operations' for the new file
*/
-struct file *alloc_file(const struct path *path, fmode_t mode,
+static struct file *alloc_file(const struct path *path, fmode_t mode,
const struct file_operations *fop)
{
struct file *file;
@@ -180,7 +180,6 @@ struct file *alloc_file(const struct path *path, fmode_t mode,
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, fmode_t mode,
diff --git a/include/linux/file.h b/include/linux/file.h
index 22becbfd4cec..325b36ca336d 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -19,8 +19,6 @@ struct vfsmount;
struct dentry;
struct inode;
struct path;
-extern struct file *alloc_file(const struct path *, fmode_t mode,
- const struct file_operations *fop);
extern struct file *alloc_file_pseudo(struct inode *, struct vfsmount *,
const char *, fmode_t, const struct file_operations *);
extern struct file *alloc_file_clone(struct file *, fmode_t,
--
2.11.0