From 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 4 Feb 2000 07:40:19 +0000 Subject: Merge with Linux 2.3.32. --- fs/sysv/symlink.c | 73 +++---------------------------------------------------- 1 file changed, 4 insertions(+), 69 deletions(-) (limited to 'fs/sysv/symlink.c') diff --git a/fs/sysv/symlink.c b/fs/sysv/symlink.c index df611d589..3f77f831e 100644 --- a/fs/sysv/symlink.c +++ b/fs/sysv/symlink.c @@ -13,79 +13,14 @@ * SystemV/Coherent symlink handling code */ -#include -#include #include -#include - -#include - -static int sysv_readlink(struct dentry *, char *, int); -static struct dentry *sysv_follow_link(struct dentry *, struct dentry *, unsigned int); /* * symlinks can't do much... */ struct inode_operations sysv_symlink_inode_operations = { - NULL, /* no file-operations */ - NULL, /* create */ - NULL, /* lookup */ - NULL, /* link */ - NULL, /* unlink */ - NULL, /* symlink */ - NULL, /* mkdir */ - NULL, /* rmdir */ - NULL, /* mknod */ - NULL, /* rename */ - sysv_readlink, /* readlink */ - sysv_follow_link, /* follow_link */ - NULL, /* get_block */ - NULL, /* readpage */ - NULL, /* writepage */ - NULL, /* flushpage */ - NULL, /* truncate */ - NULL, /* permission */ - NULL, /* smap */ - NULL /* revalidate */ + readlink: page_readlink, + follow_link: page_follow_link, + get_block: sysv_get_block, + readpage: block_read_full_page }; - -static struct dentry *sysv_follow_link(struct dentry * dentry, - struct dentry * base, - unsigned int follow) -{ - struct inode *inode = dentry->d_inode; - struct buffer_head * bh; - - bh = sysv_file_bread(inode, 0, 0); - if (!bh) { - dput(base); - return ERR_PTR(-EIO); - } - UPDATE_ATIME(inode); - base = lookup_dentry(bh->b_data, base, follow); - brelse(bh); - return base; -} - -static int sysv_readlink(struct dentry * dentry, char * buffer, int buflen) -{ - struct inode *inode = dentry->d_inode; - struct buffer_head * bh; - char * bh_data; - int i; - char c; - - if (buflen > inode->i_sb->sv_block_size_1) - buflen = inode->i_sb->sv_block_size_1; - bh = sysv_file_bread(inode, 0, 0); - if (!bh) - return 0; - bh_data = bh->b_data; - i = 0; - while (i