aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-08-29 14:06:07 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:52:26 -0400
commit7b0de42d7c5a471741ede4e71727d88000e6ea59 (patch)
tree808b27ad3b2f4a83a97bcc4c001970fab96ff7b6 /fs
parent07f3f05c1e3052b8656129b2a5aca9f888241a34 (diff)
[PATCH] BLOCK: Remove dependence on existence of blockdev_superblock [try #6]
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 <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c6
-rw-r--r--fs/internal.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 0639024d83a9..c403b66ec83c 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -319,7 +319,7 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
319 319
320 if (!bdi_cap_writeback_dirty(bdi)) { 320 if (!bdi_cap_writeback_dirty(bdi)) {
321 list_move(&inode->i_list, &sb->s_dirty); 321 list_move(&inode->i_list, &sb->s_dirty);
322 if (sb == blockdev_superblock) { 322 if (sb_is_blkdev_sb(sb)) {
323 /* 323 /*
324 * Dirty memory-backed blockdev: the ramdisk 324 * Dirty memory-backed blockdev: the ramdisk
325 * driver does this. Skip just this inode 325 * driver does this. Skip just this inode
@@ -336,14 +336,14 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
336 336
337 if (wbc->nonblocking && bdi_write_congested(bdi)) { 337 if (wbc->nonblocking && bdi_write_congested(bdi)) {
338 wbc->encountered_congestion = 1; 338 wbc->encountered_congestion = 1;
339 if (sb != blockdev_superblock) 339 if (!sb_is_blkdev_sb(sb))
340 break; /* Skip a congested fs */ 340 break; /* Skip a congested fs */
341 list_move(&inode->i_list, &sb->s_dirty); 341 list_move(&inode->i_list, &sb->s_dirty);
342 continue; /* Skip a congested blockdev */ 342 continue; /* Skip a congested blockdev */
343 } 343 }
344 344
345 if (wbc->bdi && bdi != wbc->bdi) { 345 if (wbc->bdi && bdi != wbc->bdi) {
346 if (sb != blockdev_superblock) 346 if (!sb_is_blkdev_sb(sb))
347 break; /* fs has the wrong queue */ 347 break; /* fs has the wrong queue */
348 list_move(&inode->i_list, &sb->s_dirty); 348 list_move(&inode->i_list, &sb->s_dirty);
349 continue; /* blockdev has wrong queue */ 349 continue; /* blockdev has wrong queue */
diff --git a/fs/internal.h b/fs/internal.h
index c21ecd37b1e7..f662b703bb97 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -17,6 +17,8 @@
17extern struct super_block *blockdev_superblock; 17extern struct super_block *blockdev_superblock;
18extern void __init bdev_cache_init(void); 18extern void __init bdev_cache_init(void);
19 19
20#define sb_is_blkdev_sb(sb) ((sb) == blockdev_superblock)
21
20/* 22/*
21 * char_dev.c 23 * char_dev.c
22 */ 24 */