Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 24 Mar 2003 10:16:05 -0800 | From | Andrew Morton <> | Subject | Re: ancient block_dev patch |
| |
davej@codemonkey.org.uk wrote: > > Andrew, > What became of this patch ? Is it needed ? > > > ... > down(&bdev->bd_sem); > - switch (kind) { > - case BDEV_FILE: > - case BDEV_FS: > - sync_blockdev(bd_inode->i_bdev); > - break; > - } > lock_kernel(); > - if (!--bdev->bd_openers) > + if (!--bdev->bd_openers) { > + switch (kind) { > + case BDEV_FILE: > + case BDEV_FS: > + sync_blockdev(bd_inode->i_bdev); > + break; > + } > kill_bdev(bdev); > + }
Seems so, yes. Without it we sync the blockdev on every close rather than on the final one.
It has scary potential to expose existing bugs. I shall play with it, thanks. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |