mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: viro@www.linux.org.uk
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] (4/9) symlink patchkit (against -bk current)
Date: Tue, 22 Jun 2004 20:23:56 +0100	[thread overview]
Message-ID: <E1Bcqs8-0003xW-K0@www.linux.org.uk> (raw)

        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,
 };
 

                 reply	other threads:[~2004-06-22 20:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1Bcqs8-0003xW-K0@www.linux.org.uk \
    --to=viro@www.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®