]> git.hungrycats.org Git - linux/commitdiff
[PATCH] SCSI tape fixes: remove f_pos handling
authorKai Mäkisara <kai.makisara@kolumbus.fi>
Tue, 15 Mar 2005 07:48:37 +0000 (01:48 -0600)
committerJames Bottomley <jejb@titanic.il.steeleye.com>
Tue, 15 Mar 2005 07:48:37 +0000 (01:48 -0600)
This patch applies over the previous patch in this thread. The patch removes
updating filp->f_pos. It has been dead code since 2.6.8 and nobody has missed
it.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/st.c

index 2ec199cce2b01bd28a3ff52fb672b1c7da4021eb..73d74ed8a95385ef6f1fe268a65297687a02a859 100644 (file)
@@ -1156,9 +1156,7 @@ static int st_flush(struct file *filp)
        if (STps->rw == ST_WRITING && !STp->pos_unknown) {
                struct st_cmdstatus *cmdstatp = &STp->buffer->cmdstat;
 
-                DEBC(printk(ST_DEB_MSG "%s: File length %lld bytes.\n",
-                            name, (long long)filp->f_pos);
-                     printk(ST_DEB_MSG "%s: Async write waits %d, finished %d.\n",
+                DEBC(printk(ST_DEB_MSG "%s: Async write waits %d, finished %d.\n",
                             name, STp->nbr_waits, STp->nbr_finished);
                )
 
@@ -1520,7 +1518,6 @@ st_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
                        }
                }
                count -= do_count;
-               filp->f_pos += do_count;
                b_point += do_count;
 
                async_write = STp->block_size == 0 && !STbp->do_dio &&
@@ -1580,7 +1577,6 @@ st_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
                                        undone = 0;
                                if (STp->block_size != 0)
                                        undone *= STp->block_size;
-                               filp->f_pos -= undone;
                                if (undone <= do_count) {
                                        /* Only data from this write is not written */
                                        count += undone;
@@ -1629,7 +1625,6 @@ st_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
                                        }
                                }
                        } else {
-                               filp->f_pos -= do_count;
                                count += do_count;
                                STps->drv_block = (-1);         /* Too cautious? */
                                retval = (-EIO);
@@ -1958,7 +1953,6 @@ st_read(struct file *filp, char __user *buf, size_t count, loff_t * ppos)
                                        goto out;
                                }
                        }
-                       filp->f_pos += transfer;
                        buf += transfer;
                        total += transfer;
                }