mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] (4/9) symlink patchkit (against -bk current)
@ 2004-06-22 19:23 viro
  0 siblings, 0 replies; only message in thread
From: viro @ 2004-06-22 19:23 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

        cases that can simply reuse ext2 helpers (page_follow_link_light()
and page_put_link()).

diff -urN RC7-bk5-trivial/fs/affs/symlink.c RC7-bk5-page/fs/affs/symlink.c
--- RC7-bk5-trivial/fs/affs/symlink.c	Tue Mar 18 02:22:56 2003
+++ RC7-bk5-page/fs/affs/symlink.c	Tue Jun 22 15:13:10 2004
@@ -78,7 +78,8 @@
 };
 
 struct inode_operations affs_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.setattr	= affs_notify_change,
 };
diff -urN RC7-bk5-trivial/fs/coda/cnode.c RC7-bk5-page/fs/coda/cnode.c
--- RC7-bk5-trivial/fs/coda/cnode.c	Sat Sep 27 22:04:56 2003
+++ RC7-bk5-page/fs/coda/cnode.c	Tue Jun 22 15:13:10 2004
@@ -17,8 +17,9 @@
 }
 
 static struct inode_operations coda_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.setattr	= coda_setattr,
 };
 
diff -urN RC7-bk5-trivial/fs/ext3/symlink.c RC7-bk5-page/fs/ext3/symlink.c
--- RC7-bk5-trivial/fs/ext3/symlink.c	Thu Oct  9 17:34:47 2003
+++ RC7-bk5-page/fs/ext3/symlink.c	Tue Jun 22 15:13:10 2004
@@ -20,24 +20,20 @@
 #include <linux/fs.h>
 #include <linux/jbd.h>
 #include <linux/ext3_fs.h>
+#include <linux/namei.h>
 #include "xattr.h"
 
-static int
-ext3_readlink(struct dentry *dentry, char __user *buffer, int buflen)
-{
-	struct ext3_inode_info *ei = EXT3_I(dentry->d_inode);
-	return vfs_readlink(dentry, buffer, buflen, (char*)ei->i_data);
-}
-
 static int ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct ext3_inode_info *ei = EXT3_I(dentry->d_inode);
-	return vfs_follow_link(nd, (char*)ei->i_data);
+	nd_set_link(nd, (char*)ei->i_data);
+	return 0;
 }
 
 struct inode_operations ext3_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.setxattr	= ext3_setxattr,
 	.getxattr	= ext3_getxattr,
 	.listxattr	= ext3_listxattr,
@@ -45,8 +41,8 @@
 };
 
 struct inode_operations ext3_fast_symlink_inode_operations = {
-	.readlink	= ext3_readlink,	/* BKL not held.  Don't need */
-	.follow_link	= ext3_follow_link,	/* BKL not held.  Don't need */
+	.readlink	= generic_readlink,
+	.follow_link	= ext3_follow_link,
 	.setxattr	= ext3_setxattr,
 	.getxattr	= ext3_getxattr,
 	.listxattr	= ext3_listxattr,
diff -urN RC7-bk5-trivial/fs/minix/inode.c RC7-bk5-page/fs/minix/inode.c
--- RC7-bk5-trivial/fs/minix/inode.c	Mon Nov 24 04:40:02 2003
+++ RC7-bk5-page/fs/minix/inode.c	Tue Jun 22 15:13:10 2004
@@ -343,8 +343,9 @@
 };
 
 static struct inode_operations minix_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.getattr	= minix_getattr,
 };
 
diff -urN RC7-bk5-trivial/fs/reiserfs/namei.c RC7-bk5-page/fs/reiserfs/namei.c
--- RC7-bk5-trivial/fs/reiserfs/namei.c	Wed Jun 16 10:26:24 2004
+++ RC7-bk5-page/fs/reiserfs/namei.c	Tue Jun 22 15:13:10 2004
@@ -1389,8 +1389,9 @@
  * stuff added
  */
 struct inode_operations reiserfs_symlink_inode_operations = {
-    .readlink       = page_readlink,
-    .follow_link    = page_follow_link,
+    .readlink       = generic_readlink,
+    .follow_link    = page_follow_link_light,
+    .put_link       = page_put_link,
     .setattr        = reiserfs_setattr,
     .setxattr       = reiserfs_setxattr,
     .getxattr       = reiserfs_getxattr,
diff -urN RC7-bk5-trivial/fs/sysv/inode.c RC7-bk5-page/fs/sysv/inode.c
--- RC7-bk5-trivial/fs/sysv/inode.c	Mon May 10 00:23:36 2004
+++ RC7-bk5-page/fs/sysv/inode.c	Tue Jun 22 15:13:10 2004
@@ -142,8 +142,9 @@
 }
 
 static struct inode_operations sysv_symlink_inode_operations = {
-	.readlink	= page_readlink,
-	.follow_link	= page_follow_link,
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
 	.getattr	= sysv_getattr,
 };
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-22 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-22 19:23 [PATCH] (4/9) symlink patchkit (against -bk current) viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®