Commit d8479cd9 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] rd.c blocksize handling

	Unlike other drivers, rd.c wants block size to be set once an
forever (for everybody else setting block size as high as possible and
letting filesystems change it with set_blocksize() is OK; rd.c treats
invalidate_buffers() as "kill the ramdisk contents".
parent ec3a47e7
...@@ -376,6 +376,7 @@ static int rd_open(struct inode * inode, struct file * filp) ...@@ -376,6 +376,7 @@ static int rd_open(struct inode * inode, struct file * filp)
if (rd_bdev[unit] == NULL) { if (rd_bdev[unit] == NULL) {
rd_bdev[unit] = bdget(kdev_t_to_nr(inode->i_rdev)); rd_bdev[unit] = bdget(kdev_t_to_nr(inode->i_rdev));
rd_bdev[unit]->bd_openers++; rd_bdev[unit]->bd_openers++;
rd_bdev[unit]->bd_block_size = rd_blocksize;
rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops; rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment