diff mbox

fs: remove page_readlink

Message ID 20170509130829.3946-1-hch@lst.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig May 9, 2017, 1:08 p.m. UTC
Opencode it in AFS, the only user instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/afs/mntpt.c     | 13 ++++++++++++-
 fs/namei.c         | 11 -----------
 include/linux/fs.h |  1 -
 3 files changed, 12 insertions(+), 13 deletions(-)

Comments

Jeffrey E Altman May 9, 2017, 1:17 p.m. UTC | #1
On 5/9/2017 9:08 AM, Christoph Hellwig wrote:
> Opencode it in AFS, the only user instead.
> 

Christopher,

page_readlink() is used by out of tree filesystems as well as "kafs".
Please do not remove it.

Thank you.

Jeffrey Altman
Jeffrey E Altman May 9, 2017, 1:18 p.m. UTC | #2
On 5/9/2017 9:17 AM, Jeffrey Altman wrote:
> On 5/9/2017 9:08 AM, Christoph Hellwig wrote:
>> Opencode it in AFS, the only user instead.
>>
> 
> Christopher,

Christoph, my apologies for mistyping your name.

Jeffrey Altman
Christoph Hellwig May 9, 2017, 1:31 p.m. UTC | #3
On Tue, May 09, 2017 at 09:17:09AM -0400, Jeffrey Altman wrote:
> On 5/9/2017 9:08 AM, Christoph Hellwig wrote:
> > Opencode it in AFS, the only user instead.
> > 
> 
> Christopher,
> 
> page_readlink() is used by out of tree filesystems as well as "kafs".

Which does not matter at all.
kernel test robot May 11, 2017, 3:24 a.m. UTC | #4
Hi Christoph,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.11 next-20170510]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Christoph-Hellwig/fs-remove-page_readlink/20170511-062855
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "readlink_copy" [fs/afs/kafs.ko] undefined!

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
David Howells May 15, 2017, 12:59 p.m. UTC | #5
Christoph Hellwig <hch@lst.de> wrote:

> Opencode it in AFS, the only user instead.

readlink_copy() isn't exported.

David
diff mbox

Patch

diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index bd3b65cde282..a4859ae2486f 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -31,9 +31,20 @@  const struct file_operations afs_mntpt_file_operations = {
 	.llseek		= noop_llseek,
 };
 
+static int afs_mntpt_readlink(struct dentry *dentry, char __user *buffer,
+		int buflen)
+{
+	DEFINE_DELAYED_CALL(done);
+	int res = readlink_copy(buffer, buflen,
+				page_get_link(dentry, d_inode(dentry),
+					      &done));
+	do_delayed_call(&done);
+	return res;
+}
+
 const struct inode_operations afs_mntpt_inode_operations = {
 	.lookup		= afs_mntpt_lookup,
-	.readlink	= page_readlink,
+	.readlink	= afs_mntpt_readlink,
 	.getattr	= afs_getattr,
 };
 
diff --git a/fs/namei.c b/fs/namei.c
index 9a7f8bd748d8..c5272b117029 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4746,17 +4746,6 @@  void page_put_link(void *arg)
 }
 EXPORT_SYMBOL(page_put_link);
 
-int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
-{
-	DEFINE_DELAYED_CALL(done);
-	int res = readlink_copy(buffer, buflen,
-				page_get_link(dentry, d_inode(dentry),
-					      &done));
-	do_delayed_call(&done);
-	return res;
-}
-EXPORT_SYMBOL(page_readlink);
-
 /*
  * The nofs argument instructs pagecache_write_begin to pass AOP_FLAG_NOFS
  */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5d62d2c47939..8f104dcfca60 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2897,7 +2897,6 @@  extern const struct file_operations generic_ro_fops;
 #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
 
 extern int readlink_copy(char __user *, int, const char *);
-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 *);