]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'block/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Oct 2012 00:13:54 +0000 (11:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Oct 2012 00:13:58 +0000 (11:13 +1100)
Conflicts:
init/Kconfig

12 files changed:
1  2 
MAINTAINERS
block/blk-core.c
block/genhd.c
block/ioctl.c
drivers/block/Kconfig
drivers/block/floppy.c
drivers/md/dm.c
drivers/md/md.c
drivers/target/target_core_iblock.c
fs/block_dev.c
include/linux/fs.h
lib/scatterlist.c

diff --cc MAINTAINERS
Simple merge
Simple merge
diff --cc block/genhd.c
Simple merge
diff --cc block/ioctl.c
Simple merge
Simple merge
Simple merge
diff --cc drivers/md/dm.c
Simple merge
diff --cc drivers/md/md.c
Simple merge
Simple merge
diff --cc fs/block_dev.c
index 38e721b35d45388cb0febed8021a02277a4a2f1b,37967bcea05c10be626bc9a3c55d882ebb119adf..b3c1d3dae77d06fcde3fa3ecf36b2af9e2b25d85
@@@ -124,6 -126,20 +126,19 @@@ int set_blocksize(struct block_device *
        if (size < bdev_logical_block_size(bdev))
                return -EINVAL;
  
 -      if (!prio_tree_empty(&mapping->i_mmap) ||
 -          !list_empty(&mapping->i_mmap_nonlinear)) {
+       /* Prevent starting I/O or mapping the device */
+       percpu_down_write(&bdev->bd_block_size_semaphore);
+       /* Check that the block device is not memory mapped */
+       mapping = bdev->bd_inode->i_mapping;
+       mutex_lock(&mapping->i_mmap_mutex);
++      if (mapping_mapped(mapping)) {
+               mutex_unlock(&mapping->i_mmap_mutex);
+               percpu_up_write(&bdev->bd_block_size_semaphore);
+               return -EBUSY;
+       }
+       mutex_unlock(&mapping->i_mmap_mutex);
        /* Don't change the size if it is same as current */
        if (bdev->bd_block_size != size) {
                sync_blockdev(bdev);
Simple merge
Simple merge