Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422696AbWHXVfg (ORCPT ); Thu, 24 Aug 2006 17:35:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422718AbWHXVdy (ORCPT ); Thu, 24 Aug 2006 17:33:54 -0400 Received: from mx1.redhat.com ([66.187.233.31]:12516 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S1422683AbWHXVdP (ORCPT ); Thu, 24 Aug 2006 17:33:15 -0400 From: David Howells Subject: [PATCH 07/17] BLOCK: Remove dependence on existence of blockdev_superblock [try #2] Date: Thu, 24 Aug 2006 22:33:08 +0100 To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dhowells@redhat.com Message-Id: <20060824213308.21323.20856.stgit@warthog.cambridge.redhat.com> In-Reply-To: <20060824213252.21323.18226.stgit@warthog.cambridge.redhat.com> References: <20060824213252.21323.18226.stgit@warthog.cambridge.redhat.com> Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit User-Agent: StGIT/0.10 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2291 Lines: 71 From: David Howells Move blockdev_superblock extern declaration from fs/fs-writeback.c to a headerfile and remove the dependence on it by wrapping it in a macro. Signed-Off-By: David Howells --- fs/fs-writeback.c | 8 +++----- include/linux/blkdev.h | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 892643d..d9de186 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -23,8 +23,6 @@ #include #include #include -extern struct super_block *blockdev_superblock; - /** * __mark_inode_dirty - internal function * @inode: inode to mark @@ -320,7 +318,7 @@ sync_sb_inodes(struct super_block *sb, s if (!bdi_cap_writeback_dirty(bdi)) { list_move(&inode->i_list, &sb->s_dirty); - if (sb == blockdev_superblock) { + if (sb_is_blkdev_sb(sb)) { /* * Dirty memory-backed blockdev: the ramdisk * driver does this. Skip just this inode @@ -337,14 +335,14 @@ sync_sb_inodes(struct super_block *sb, s if (wbc->nonblocking && bdi_write_congested(bdi)) { wbc->encountered_congestion = 1; - if (sb != blockdev_superblock) + if (!sb_is_blkdev_sb(sb)) break; /* Skip a congested fs */ list_move(&inode->i_list, &sb->s_dirty); continue; /* Skip a congested blockdev */ } if (wbc->bdi && bdi != wbc->bdi) { - if (sb != blockdev_superblock) + if (!sb_is_blkdev_sb(sb)) break; /* fs has the wrong queue */ list_move(&inode->i_list, &sb->s_dirty); continue; /* blockdev has wrong queue */ diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 41a643f..e3f30d5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -16,6 +16,10 @@ #include #include +extern struct super_block *blockdev_superblock; + +#define sb_is_blkdev_sb(sb) ((sb) == blockdev_superblock) + struct scsi_ioctl_command; struct request_queue; - 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/