]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] more shm/loop updates
authorAlexander Viro <viro@math.psu.edu>
Tue, 29 Oct 2002 13:31:57 +0000 (05:31 -0800)
committerAnton Blanchard <anton@samba.org>
Tue, 29 Oct 2002 13:31:57 +0000 (05:31 -0800)
Ok, with this simple fix loop builds and loop works no worse than the
old shm/loop approach (better - it does boot).

However, both 2.4.44+ and this animal have the same and rather odd
breakage in loop-over-device.  Loop-over-file works fine, but loop over
device gives random crap on reads.  And no, it's not a problem with
underlying device itself - something happens in loop.c.

I'm going down right now, so I'll be back in several hours and will try
to debug it.  Hopefully by the morning I'll have a fix.

drivers/block/loop.c

index c5a437f0f823bd275d1bf1d181780d9f481577f2..c5f84ce46bb219876bfc88de61b594ec9cef66bf 100644 (file)
@@ -688,7 +688,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
                if (!aops->prepare_write || !aops->commit_write)
                        lo_flags |= LO_FLAGS_READ_ONLY;
 
-               lo_blocksize = inode->i_blocksize;
+               lo_blocksize = inode->i_blksize;
                lo_flags |= LO_FLAGS_DO_BMAP;
                error = 0;
        } else