[PATCH] UFS fix for files > 2MB

From: Marcel Waldvogel (mwa@arl.wustl.edu)
Date: Sun Jun 25 2000 - 20:43:05 EST


UFS has a problem accessing a file beyond about 2MB: It returns only
null blocks when reading beyond that limit (was introduced when adding
the lock_kernel()/unlock_kernel() pair). Here's a patch against
2.4.0-test2 that fixes it (adds the missing "goto out;" to single
indirect handling also).

-Marcel

--- linux-2.4.0-test2/fs/ufs/inode.c.buggy Sun Jun 25 20:09:37 2000
+++ linux-2.4.0-test2/fs/ufs/inode.c Sun Jun 25 20:09:56 2000
@@ -136,6 +136,7 @@
                        ufs_block_bmap(bread(sb->s_dev, uspi->s_sbbase + i,
                                             sb->s_blocksize),
                                       frag & uspi->s_apbmask, uspi, swab));
+ goto out;
         }
         frag -= 1 << (uspi->s_apbshift + uspi->s_fpbshift);
         if (frag < (1 << (uspi->s_2apbshift + uspi->s_fpbshift))) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:07 EST