All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: Andrew Morton <akpm@osdl.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [Fwd: [PATCH 3/3] reiser4-fix-readlink.patch]
Date: Fri, 11 Nov 2005 11:22:29 -0800	[thread overview]
Message-ID: <4374EF75.5010105@namesys.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: [PATCH 3/3] reiser4-fix-readlink.patch --]
[-- Type: message/rfc822, Size: 4016 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.1.2: reiser4-fix-readlink.patch --]
[-- Type: text/plain, Size: 2857 bytes --]


From: Hans Reiser <reiser@namesys.com>

There is no need to implement reiser4 specific readlink. Use generic function.

Signed-off-by: Vladimir V. Saveliev <vs@namesys.com>


 fs/reiser4/plugin/inode_ops.c |   19 -------------------
 fs/reiser4/plugin/object.c    |    2 +-
 fs/reiser4/plugin/object.h    |    1 -
 3 files changed, 1 insertion(+), 21 deletions(-)

diff -puN fs/reiser4/plugin/inode_ops.c~reiser4-fix-readlink fs/reiser4/plugin/inode_ops.c
--- linux-2.6.14-rc5-mm1/fs/reiser4/plugin/inode_ops.c~reiser4-fix-readlink	2005-11-11 17:57:23.562310906 +0300
+++ linux-2.6.14-rc5-mm1-vs/fs/reiser4/plugin/inode_ops.c	2005-11-11 17:57:23.638327165 +0300
@@ -383,25 +383,6 @@ int mknod_common(struct inode *parent, s
  */
 
 /**
- * readlink_common - readlink of inode operations
- * @dentry: dentry of symlink
- * @buf: user buffer to read symlink content to
- * @buflen: size of user buffer
- *
- * This is common implementation of vfs's readlink method of struct
- * inode_operations.
- * Assumes that inode's generic_ip points to the content of symbolic link.
- */
-int readlink_common(struct dentry *dentry, char __user *buf, int buflen)
-{
-	assert("vs-852", S_ISLNK(dentry->d_inode->i_mode));
-	if (!dentry->d_inode->u.generic_ip
-	    || !inode_get_flag(dentry->d_inode, REISER4_GENERIC_PTR_USED))
-		return RETERR(-EINVAL);
-	return vfs_readlink(dentry, buf, buflen, dentry->d_inode->u.generic_ip);
-}
-
-/**
  * follow_link_common - follow_link of inode operations
  * @dentry: dentry of symlink
  * @data:
diff -puN fs/reiser4/plugin/object.c~reiser4-fix-readlink fs/reiser4/plugin/object.c
--- linux-2.6.14-rc5-mm1/fs/reiser4/plugin/object.c~reiser4-fix-readlink	2005-11-11 17:57:23.578314329 +0300
+++ linux-2.6.14-rc5-mm1-vs/fs/reiser4/plugin/object.c	2005-11-11 17:57:23.638327165 +0300
@@ -202,7 +202,7 @@ file_plugin file_plugins[LAST_FILE_PLUGI
 			.linkage = {NULL,NULL}
 		},
 		.inode_ops = {
-			.readlink = readlink_common,
+			.readlink = generic_readlink,
 			.follow_link = follow_link_common,
 			.permission = permission_common,
 			.setattr = setattr_common,
diff -puN fs/reiser4/plugin/object.h~reiser4-fix-readlink fs/reiser4/plugin/object.h
--- linux-2.6.14-rc5-mm1/fs/reiser4/plugin/object.h~reiser4-fix-readlink	2005-11-11 17:57:23.582315185 +0300
+++ linux-2.6.14-rc5-mm1-vs/fs/reiser4/plugin/object.h	2005-11-11 17:57:23.650329732 +0300
@@ -23,7 +23,6 @@ int mknod_common(struct inode *parent, s
 		 int mode, dev_t rdev);
 int rename_common(struct inode *old_dir, struct dentry *old_name,
 		  struct inode *new_dir, struct dentry *new_name);
-int readlink_common(struct dentry *, char __user *buf, int buflen);
 void *follow_link_common(struct dentry *, struct nameidata *data);
 int permission_common(struct inode *, int mask,	/* mode bits to check permissions for */
 		      struct nameidata *nameidata);

_

             reply	other threads:[~2005-11-11 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11 19:22 Hans Reiser [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-11 19:22 [Fwd: [PATCH 3/3] reiser4-fix-readlink.patch] Hans Reiser

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=4374EF75.5010105@namesys.com \
    --to=reiser@namesys.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.