namei: Merge page_symlink() and __page_symlink()

There are no callers of __page_symlink() left, so we can remove that
entry point.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
parent a125d2ae
...@@ -624,7 +624,7 @@ any symlink that might use page_follow_link_light/page_put_link() must ...@@ -624,7 +624,7 @@ any symlink that might use page_follow_link_light/page_put_link() must
have inode_nohighmem(inode) called before anything might start playing with have inode_nohighmem(inode) called before anything might start playing with
its pagecache. No highmem pages should end up in the pagecache of such its pagecache. No highmem pages should end up in the pagecache of such
symlinks. That includes any preseeding that might be done during symlink symlinks. That includes any preseeding that might be done during symlink
creation. __page_symlink() will honour the mapping gfp flags, so once creation. page_symlink() will honour the mapping gfp flags, so once
you've done inode_nohighmem() it's safe to use, but if you allocate and you've done inode_nohighmem() it's safe to use, but if you allocate and
insert the page manually, make sure to use the right gfp flags. insert the page manually, make sure to use the right gfp flags.
......
...@@ -5001,12 +5001,10 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen) ...@@ -5001,12 +5001,10 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
} }
EXPORT_SYMBOL(page_readlink); EXPORT_SYMBOL(page_readlink);
/* int page_symlink(struct inode *inode, const char *symname, int len)
* The nofs argument instructs pagecache_write_begin to pass AOP_FLAG_NOFS
*/
int __page_symlink(struct inode *inode, const char *symname, int len, int nofs)
{ {
struct address_space *mapping = inode->i_mapping; struct address_space *mapping = inode->i_mapping;
bool nofs = !mapping_gfp_constraint(mapping, __GFP_FS);
struct page *page; struct page *page;
void *fsdata; void *fsdata;
int err; int err;
...@@ -5034,13 +5032,6 @@ int __page_symlink(struct inode *inode, const char *symname, int len, int nofs) ...@@ -5034,13 +5032,6 @@ int __page_symlink(struct inode *inode, const char *symname, int len, int nofs)
fail: fail:
return err; return err;
} }
EXPORT_SYMBOL(__page_symlink);
int page_symlink(struct inode *inode, const char *symname, int len)
{
return __page_symlink(inode, symname, len,
!mapping_gfp_constraint(inode->i_mapping, __GFP_FS));
}
EXPORT_SYMBOL(page_symlink); EXPORT_SYMBOL(page_symlink);
const struct inode_operations page_symlink_inode_operations = { const struct inode_operations page_symlink_inode_operations = {
......
...@@ -3109,8 +3109,6 @@ extern int page_readlink(struct dentry *, char __user *, int); ...@@ -3109,8 +3109,6 @@ extern int page_readlink(struct dentry *, char __user *, int);
extern const char *page_get_link(struct dentry *, struct inode *, extern const char *page_get_link(struct dentry *, struct inode *,
struct delayed_call *); struct delayed_call *);
extern void page_put_link(void *); extern void page_put_link(void *);
extern int __page_symlink(struct inode *inode, const char *symname, int len,
int nofs);
extern int page_symlink(struct inode *inode, const char *symname, int len); extern int page_symlink(struct inode *inode, const char *symname, int len);
extern const struct inode_operations page_symlink_inode_operations; extern const struct inode_operations page_symlink_inode_operations;
extern void kfree_link(void *); extern void kfree_link(void *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment