All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i_blkbits inconsistency
@ 2002-10-25 21:01 Hugh Dickins
  2002-10-25 21:38 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2002-10-25 21:01 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Andrew Morton, Adam J. Richter, linux-kernel

Fix premature -EIO from blkdev_get_block: bdget initialize bd_block_size
consistent with bd_inode->i_blkbits (assigned by new_inode).  Otherwise,
subsequent set_blocksize can find bd_block_size doesn't need updating,
and skip updating i_blkbits, leaving them inconsistent.

--- 2.5.44/fs/block_dev.c	Sat Oct 19 07:14:45 2002
+++ linux/fs/block_dev.c	Fri Oct 25 21:30:41 2002
@@ -310,6 +310,7 @@
 			new_bdev->bd_queue = NULL;
 			new_bdev->bd_contains = NULL;
 			new_bdev->bd_inode = inode;
+			new_bdev->bd_block_size = (1 << inode->i_blkbits);
 			new_bdev->bd_part_count = 0;
 			new_bdev->bd_invalidated = 0;
 			inode->i_mode = S_IFBLK;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-25 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-25 21:01 [PATCH] i_blkbits inconsistency Hugh Dickins
2002-10-25 21:38 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.