linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: [PATCH 06/22] namei: Merge page_symlink() and __page_symlink()
Date: Tue, 22 Feb 2022 19:48:04 +0000	[thread overview]
Message-ID: <20220222194820.737755-7-willy@infradead.org> (raw)
In-Reply-To: <20220222194820.737755-1-willy@infradead.org>

There are no callers of __page_symlink() left, so we can remove that
entry point.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 Documentation/filesystems/porting.rst |  2 +-
 fs/namei.c                            | 13 ++-----------
 include/linux/fs.h                    |  2 --
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/Documentation/filesystems/porting.rst b/Documentation/filesystems/porting.rst
index bf19fd6b86e7..0d847532f767 100644
--- a/Documentation/filesystems/porting.rst
+++ b/Documentation/filesystems/porting.rst
@@ -618,7 +618,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
 its pagecache.  No highmem pages should end up in the pagecache of such
 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
 insert the page manually, make sure to use the right gfp flags.
 
diff --git a/fs/namei.c b/fs/namei.c
index 3f1829b3ab5b..8335dad105b4 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -5003,12 +5003,10 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
 }
 EXPORT_SYMBOL(page_readlink);
 
-/*
- * 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)
+int page_symlink(struct inode *inode, const char *symname, int len)
 {
 	struct address_space *mapping = inode->i_mapping;
+	bool nofs = !mapping_gfp_constraint(mapping, __GFP_FS);
 	struct page *page;
 	void *fsdata;
 	int err;
@@ -5036,13 +5034,6 @@ int __page_symlink(struct inode *inode, const char *symname, int len, int nofs)
 fail:
 	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);
 
 const struct inode_operations page_symlink_inode_operations = {
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 10ba90e22b4b..4db0893750aa 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3214,8 +3214,6 @@ extern int page_readlink(struct dentry *, char __user *, int);
 extern const char *page_get_link(struct dentry *, struct inode *,
 				 struct delayed_call *);
 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 const struct inode_operations page_symlink_inode_operations;
 extern void kfree_link(void *);
-- 
2.34.1


  parent reply	other threads:[~2022-02-22 19:48 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 19:47 [PATCH 00/22] Remove aop flags Matthew Wilcox (Oracle)
2022-02-22 19:47 ` [PATCH 01/22] fs: Pass an iocb to generic_perform_write() Matthew Wilcox (Oracle)
2022-02-23  6:51   ` Christoph Hellwig
2022-03-02 17:36     ` Matthew Wilcox
2022-02-23  8:47   ` Christian Brauner
2022-02-22 19:48 ` [PATCH 02/22] fs: Move pagecache_write_begin() and pagecache_write_end() Matthew Wilcox (Oracle)
2022-02-23  6:53   ` Christoph Hellwig
2022-02-23  8:47   ` Christian Brauner
2022-02-22 19:48 ` [PATCH 03/22] reiserfs: Stop using AOP_FLAG_CONT_EXPAND flag Matthew Wilcox (Oracle)
2022-02-23  6:54   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 04/22] filemap: Remove AOP_FLAG_CONT_EXPAND Matthew Wilcox (Oracle)
2022-02-23  6:54   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 05/22] ext4: Use page_symlink() instead of __page_symlink() Matthew Wilcox (Oracle)
2022-02-23  6:54   ` Christoph Hellwig
2022-02-22 19:48 ` Matthew Wilcox (Oracle) [this message]
2022-02-23  6:55   ` [PATCH 06/22] namei: Merge page_symlink() and __page_symlink() Christoph Hellwig
2022-02-23  8:48   ` Christian Brauner
2022-02-22 19:48 ` [PATCH 07/22] namei: Convert page_symlink() to use memalloc_nofs_save() Matthew Wilcox (Oracle)
2022-02-23  6:56   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 08/22] f2fs: Convert f2fs_grab_cache_page() to use scoped memory APIs Matthew Wilcox (Oracle)
2022-02-23  6:57   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 09/22] ext4: Allow GFP_FS allocations in ext4_da_convert_inline_data_to_extent() Matthew Wilcox (Oracle)
2022-03-08 17:12   ` Theodore Ts'o
2022-02-22 19:48 ` [PATCH 10/22] ext4: Use scoped memory API in mext_page_double_lock() Matthew Wilcox (Oracle)
2022-03-08 17:13   ` Theodore Ts'o
2022-02-22 19:48 ` [PATCH 11/22] ext4: Use scoped memory APIs in ext4_da_write_begin() Matthew Wilcox (Oracle)
2022-03-08 17:13   ` Theodore Ts'o
2022-02-22 19:48 ` [PATCH 12/22] ext4: Use scoped memory APIs in ext4_write_begin() Matthew Wilcox (Oracle)
2022-03-08 15:55   ` Theodore Ts'o
2022-02-22 19:48 ` [PATCH 13/22] fs: Remove AOP_FLAG_NOFS Matthew Wilcox (Oracle)
2022-02-23  6:57   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 14/22] fs: Remove aop flags argument from pagecache_write_begin() Matthew Wilcox (Oracle)
2022-02-23  6:57   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 15/22] fs: Remove aop_flags parameter from netfs_write_begin() Matthew Wilcox (Oracle)
2022-02-23  6:57   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 16/22] fs: Remove aop flags parameter from block_write_begin() Matthew Wilcox (Oracle)
2022-02-23  6:58   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 17/22] fs: Remove aop flags parameter from cont_write_begin() Matthew Wilcox (Oracle)
2022-02-23  6:59   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 18/22] fs: Remove aop flags parameter from grab_cache_page_write_begin() Matthew Wilcox (Oracle)
2022-02-23  6:59   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 19/22] affs: Use pagecache_write_begin() & pagecache_write_end() Matthew Wilcox (Oracle)
2022-02-23  7:05   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 20/22] f2fs: " Matthew Wilcox (Oracle)
2022-02-22 19:48 ` [PATCH 21/22] fs: Remove aop flags parameter from nobh_write_begin() Matthew Wilcox (Oracle)
2022-02-23  7:05   ` Christoph Hellwig
2022-02-22 19:48 ` [PATCH 22/22] fs: Remove flags parameter from aops->write_begin Matthew Wilcox (Oracle)
2022-02-23  7:06   ` Christoph Hellwig
2022-02-22 22:24 ` [PATCH 00/22] Remove aop flags Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220222194820.737755-7-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).