[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20121001125619.97649131.akpm@linux-foundation.org>
Date: Mon, 1 Oct 2012 12:56:19 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Michel Lespinasse <walken@...gle.com>,
Jens Axboe <axboe@...nel.dk>
Subject: Re: linux-next: build failure after merge of the akpm tree
On Fri, 28 Sep 2012 11:19:29 -0400 (EDT)
Mikulas Patocka <mpatocka@...hat.com> 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@...b.auug.org.au
>
> ... or replace it with
>
> if (mapping_mapped(&mapping)) { ...
yup..
From: Andrew Morton <akpm@...ux-foundation.org>
Subject: fs/block_dev.c:set_blocksize(): use mapping_mapped()
... instead of open-coding it.
Suggested-by: Mikulas Patocka <mpatocka@...hat.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists