Make lock_fs optional in dm_suspend(). Index: linux-2.6.14-rc2/drivers/md/dm-ioctl.c =================================================================== --- linux-2.6.14-rc2.orig/drivers/md/dm-ioctl.c 2005-10-26 20:14:34.000000000 +0100 +++ linux-2.6.14-rc2/drivers/md/dm-ioctl.c 2005-10-26 20:22:53.000000000 +0100 @@ -690,7 +690,7 @@ static int do_suspend(struct dm_ioctl *p return -ENXIO; if (!dm_suspended(md)) - r = dm_suspend(md); + r = dm_suspend(md, 1); if (!r) r = __dev_status(md, param); @@ -728,7 +728,7 @@ static int do_resume(struct dm_ioctl *pa if (new_map) { /* Suspend if it isn't already suspended */ if (!dm_suspended(md)) - dm_suspend(md); + dm_suspend(md, 1); r = dm_swap_table(md, new_map); if (r) { Index: linux-2.6.14-rc2/drivers/md/dm.h =================================================================== --- linux-2.6.14-rc2.orig/drivers/md/dm.h 2005-10-26 20:14:34.000000000 +0100 +++ linux-2.6.14-rc2/drivers/md/dm.h 2005-10-26 20:22:53.000000000 +0100 @@ -69,7 +69,7 @@ void dm_put(struct mapped_device *md); /* * A device can still be used while suspended, but I/O is deferred. */ -int dm_suspend(struct mapped_device *md); +int dm_suspend(struct mapped_device *md, int with_lockfs); int dm_resume(struct mapped_device *md); /* Index: linux-2.6.14-rc2/drivers/md/dm.c =================================================================== --- linux-2.6.14-rc2.orig/drivers/md/dm.c 2005-10-26 20:21:58.000000000 +0100 +++ linux-2.6.14-rc2/drivers/md/dm.c 2005-10-26 20:22:53.000000000 +0100 @@ -1040,7 +1040,7 @@ static void unlock_fs(struct mapped_devi * dm_bind_table, dm_suspend must be called to flush any in * flight bios and ensure that any further io gets deferred. */ -int dm_suspend(struct mapped_device *md) +int dm_suspend(struct mapped_device *md, int do_lockfs) { struct dm_table *map = NULL; DECLARE_WAITQUEUE(wait, current); @@ -1064,9 +1064,11 @@ int dm_suspend(struct mapped_device *md) } /* Flush I/O to the device. */ - r = lock_fs(md); - if (r) - goto out; + if (do_lockfs) { + r = lock_fs(md); + if (r) + goto out; + } /* * First we set the BLOCK_IO flag so no more ios will be mapped.