On Fri, 28 Sep 2012 11:19:29 -0400 (EDT) Mikulas Patocka <mpatocka@xxxxxxxxxx> wrote: > > - if (!prio_tree_empty(&mapping->i_mmap) || > > + if (!RB_EMPTY_ROOT(&mapping->i_mmap) || > > !list_empty(&mapping->i_mmap_nonlinear)) { > > mutex_unlock(&mapping->i_mmap_mutex); > > percpu_up_write(&bdev->bd_block_size_semaphore); > > -- > > 1.7.10.280.gaa39 > > > > -- > > Cheers, > > Stephen Rothwell sfr@xxxxxxxxxxxxxxxx > > ... or replace it with > > if (mapping_mapped(&mapping)) { ... yup.. From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: fs/block_dev.c:set_blocksize(): use mapping_mapped() ... instead of open-coding it. Suggested-by: Mikulas Patocka <mpatocka@xxxxxxxxxx> Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/block_dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -puN fs/block_dev.c~fs-block_devc-set_blocksize-use-mapping_mapped fs/block_dev.c --- a/fs/block_dev.c~fs-block_devc-set_blocksize-use-mapping_mapped +++ a/fs/block_dev.c @@ -27,7 +27,6 @@ #include <linux/namei.h> #include <linux/log2.h> #include <linux/cleancache.h> -#include <linux/rbtree.h> #include <asm/uaccess.h> #include "internal.h" @@ -133,8 +132,7 @@ int set_blocksize(struct block_device *b /* Check that the block device is not memory mapped */ mapping = bdev->bd_inode->i_mapping; mutex_lock(&mapping->i_mmap_mutex); - if (!RB_EMPTY_ROOT(&mapping->i_mmap) || - !list_empty(&mapping->i_mmap_nonlinear)) { + if (mapping_mapped(mapping)) { mutex_unlock(&mapping->i_mmap_mutex); percpu_up_write(&bdev->bd_block_size_semaphore); return -EBUSY; _ -- To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html