--- Begin Message ---
- To: Hans Reiser <[email protected]>
- Subject: [PATCH 3/3] reiser4-fix-readlink.patch
- From: "Vladimir V. Saveliev" <[email protected]>
- Date: Fri, 11 Nov 2005 19:17:45 +0300
- Delivered-to: [email protected]
- Organization: Namesys
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511
From: Hans Reiser <[email protected]>
There is no need to implement reiser4 specific readlink. Use generic function.
Signed-off-by: Vladimir V. Saveliev <[email protected]>
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);
_
--- End Message ---
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]