diff -u linux/fs/ocfs/Linux/ocfsmain.c-o linux/fs/ocfs/Linux/ocfsmain.c --- linux/fs/ocfs/Linux/ocfsmain.c-o 2003-06-16 21:06:39.000000000 +0200 +++ linux/fs/ocfs/Linux/ocfsmain.c 2003-06-17 10:48:04.000000000 +0200 @@ -1526,12 +1526,7 @@ static ssize_t ocfs_rw_direct (int rw, struct file *filp, char *buf, size_t size, loff_t * offp) { -#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10) struct kiobuf *iobuf; -#else - struct kiobuf *iobuf = filp->f_iobuf; - int new_iobuf = 0; -#endif int err = 0; unsigned long blocknr, blocks, myiosize; size_t transferred; @@ -1668,25 +1663,10 @@ nbhs = (size >> SECTOR_BITS); if (nbhs > max_sectors) nbhs = max_sectors; -#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10) err = alloc_kiovec_sz (1, &iobuf, &nbhs); -#else - if (test_and_set_bit(0, &filp->f_iobuf_lock)) { - /* - * A parallel read/write is using the preallocated iobuf - * so just run slow and allocate a new one. - */ - err = alloc_kiovec_sz (1, &iobuf, &nbhs); - if (err) - goto out; - new_iobuf = 1; - } -#endif inuse = true; -#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10) if (err) goto out; -#endif totalioblocks = 0; while (size > 0) { if (large_io) { @@ -1709,19 +1689,11 @@ } /* get the blocknr depending on io size for all blocks */ /* since we are awlays within the extent we only need to get the first block */ -#ifdef SUSE - iobuf->kio_blocks[0] = firstphys + totalioblocks; -#else iobuf->blocks[0] = firstphys + totalioblocks; -#endif if (large_io) { blocknr+=8; -#ifdef SUSE - iobuf->kio_blocks[0]=iobuf->kio_blocks[0] / 8; -#else iobuf->blocks[0]=iobuf->blocks[0] / 8; -#endif } else { blocknr++; } @@ -1732,21 +1704,11 @@ } else { blocknr++; } -#ifdef SUSE - iobuf->kio_blocks[i]=iobuf->kio_blocks[0] + i; -#else iobuf->blocks[i]=iobuf->blocks[0] + i; -#endif } -#ifdef SUSE - err = - brw_kiovec (rw, 1, &iobuf, inode->i_dev, iobuf->kio_blocks, - large_io ? 4096 : 512); -#else err = brw_kiovec (rw, 1, &iobuf, inode->i_dev, iobuf->blocks, large_io ? 4096 : 512); -#endif #ifdef SUSE if (rw == READ && err > 0) mark_dirty_kiobuf(iobuf, err); @@ -1774,14 +1736,7 @@ printk("need to fail out\n"); break; } -#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10) free_kiovec_sz(1, &iobuf, &nbhs); -#else - if (!new_iobuf) - clear_bit(0, &filp->f_iobuf_lock); - else - free_kiovec_sz(1, &iobuf, &nbhs); -#endif inuse = false; totalioblocks = 0; firstlogic = nextlogic; @@ -1793,17 +1748,8 @@ } out: -#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10) if (inuse) free_kiovec_sz (1, &iobuf, &nbhs); -#else - if (inuse) { - if (!new_iobuf) - clear_bit(0, &filp->f_iobuf_lock); - else - free_kiovec_sz(1, &iobuf, &nbhs); - } -#endif return err; } /* ocfs_rw_direct */