patch-2.1.120 linux/fs/umsdos/symlink.c
Next file: linux/include/asm-i386/checksum.h
Previous file: linux/fs/umsdos/rdir.c
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Wed Sep 2 16:12:37 1998
- Orig file:
v2.1.119/linux/fs/umsdos/symlink.c
- Orig date:
Wed Aug 26 11:37:43 1998
diff -u --recursive --new-file v2.1.119/linux/fs/umsdos/symlink.c linux/fs/umsdos/symlink.c
@@ -19,9 +19,6 @@
#include <asm/uaccess.h>
#include <asm/system.h>
-#define PRINTK(x)
-#define Printk(x) printk x
-
static struct file_operations umsdos_symlink_operations;
@@ -31,10 +28,9 @@
*
*/
-static int umsdos_readlink_x (
- struct dentry *dentry,
- char *buffer,
- int bufsiz)
+int umsdos_readlink_x ( struct dentry *dentry,
+ char *buffer,
+ int bufsiz)
{
int ret;
loff_t loffs = 0;
@@ -42,7 +38,10 @@
ret = dentry->d_inode->i_size;
- check_dentry (dentry);
+ if (!(dentry->d_inode)) {
+ return -EBADF;
+ }
+
fill_new_filp (&filp, dentry);
filp.f_reada = 0;
@@ -68,7 +67,7 @@
if (fat_file_read (&filp, buffer, (size_t) ret, &loffs) != ret) {
ret = -EIO;
}
-#if 0 /* DEBUG */
+#if 0
{
struct umsdos_dirent *mydirent = buffer;
@@ -89,9 +88,11 @@
int ret;
PRINTK ((KERN_DEBUG "UMSDOS_readlink: calling umsdos_readlink_x for %.*s\n", (int) dentry->d_name.len, dentry->d_name.name));
+
ret = umsdos_readlink_x (dentry, buffer, buflen);
PRINTK ((KERN_DEBUG "readlink %d bufsiz %d\n", ret, buflen));
- /* dput(dentry); / * FIXME /mn/ */
+ /* dput(dentry); / * FIXME /mn/? It seems it is unneeded. d_count is not changed by umsdos_readlink_x */
+
Printk ((KERN_WARNING "UMSDOS_readlink /mn/: FIXME! skipped dput(dentry). returning %d\n", ret));
return ret;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov