patch-2.3.99-pre4 linux/fs/read_write.c

Next file: linux/fs/super.c
Previous file: linux/fs/ramfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/fs/read_write.c linux/fs/read_write.c
@@ -64,17 +64,11 @@
 {
 	off_t retval;
 	struct file * file;
-	struct dentry * dentry;
-	struct inode * inode;
 
 	retval = -EBADF;
 	file = fget(fd);
 	if (!file)
 		goto bad;
-	/* N.B. Shouldn't this be ENOENT?? */
-	if (!(dentry = file->f_dentry) ||
-	    !(inode = dentry->d_inode))
-		goto out_putf;
 	retval = -EINVAL;
 	if (origin <= 2) {
 		loff_t res = llseek(file, offset, origin);
@@ -82,7 +76,6 @@
 		if (res != (loff_t)retval)
 			retval = -EOVERFLOW;	/* LFS: should only happen on 32 bit platforms */
 	}
-out_putf:
 	fput(file);
 bad:
 	return retval;
@@ -95,18 +88,12 @@
 {
 	int retval;
 	struct file * file;
-	struct dentry * dentry;
-	struct inode * inode;
 	loff_t offset;
 
 	retval = -EBADF;
 	file = fget(fd);
 	if (!file)
 		goto bad;
-	/* N.B. Shouldn't this be ENOENT?? */
-	if (!(dentry = file->f_dentry) ||
-	    !(inode = dentry->d_inode))
-		goto out_putf;
 	retval = -EINVAL;
 	if (origin > 2)
 		goto out_putf;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)