diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-07-20 14:56:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-07-20 14:56:40 +0000 |
commit | e308faf24f68e262d92d294a01ddca7a17e76762 (patch) | |
tree | 22c47cb315811834861f013067878ff664e95abd /fs/minix/symlink.c | |
parent | 30c6397ce63178fcb3e7963ac247f0a03132aca9 (diff) |
Sync with Linux 2.1.46.
Diffstat (limited to 'fs/minix/symlink.c')
-rw-r--r-- | fs/minix/symlink.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/minix/symlink.c b/fs/minix/symlink.c index 92539cded..9f759ecc9 100644 --- a/fs/minix/symlink.c +++ b/fs/minix/symlink.c @@ -15,6 +15,7 @@ #include <asm/uaccess.h> static int minix_readlink(struct inode *, char *, int); +static struct dentry *minix_follow_link(struct inode *, struct dentry *); /* * symlinks can't do much... @@ -31,6 +32,7 @@ struct inode_operations minix_symlink_inode_operations = { NULL, /* mknod */ NULL, /* rename */ minix_readlink, /* readlink */ + minix_follow_link, /* follow_link */ NULL, /* readpage */ NULL, /* writepage */ NULL, /* bmap */ @@ -38,6 +40,21 @@ struct inode_operations minix_symlink_inode_operations = { NULL /* permission */ }; +static struct dentry * minix_follow_link(struct inode * inode, struct dentry * base) +{ + struct buffer_head * bh; + + bh = minix_bread(inode, 0, 0); + if (!bh) { + dput(base); + return ERR_PTR(-EIO); + } + UPDATE_ATIME(inode); + base = lookup_dentry(bh->b_data, base, 1); + brelse(bh); + return base; +} + static int minix_readlink(struct inode * inode, char * buffer, int buflen) { struct buffer_head * bh; @@ -47,7 +64,6 @@ static int minix_readlink(struct inode * inode, char * buffer, int buflen) if (buflen > 1023) buflen = 1023; bh = minix_bread(inode, 0, 0); - iput(inode); if (!bh) return 0; i = 0; |