[PATCH] fs: remove page_readlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Opencode it in AFS, the only user instead.

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

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 *);
-- 
2.11.0




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux