Commit 7b0de42d7c5a471741ede4e71727d88000e6ea59
Committed by
Jens Axboe
1 parent
07f3f05c1e
Exists in
master
and in
7 other branches
[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>
Showing 2 changed files with 5 additions and 3 deletions Side-by-side Diff
fs/fs-writeback.c
... | ... | @@ -319,7 +319,7 @@ |
319 | 319 | |
320 | 320 | if (!bdi_cap_writeback_dirty(bdi)) { |
321 | 321 | list_move(&inode->i_list, &sb->s_dirty); |
322 | - if (sb == blockdev_superblock) { | |
322 | + if (sb_is_blkdev_sb(sb)) { | |
323 | 323 | /* |
324 | 324 | * Dirty memory-backed blockdev: the ramdisk |
325 | 325 | * driver does this. Skip just this inode |
326 | 326 | |
... | ... | @@ -336,14 +336,14 @@ |
336 | 336 | |
337 | 337 | if (wbc->nonblocking && bdi_write_congested(bdi)) { |
338 | 338 | wbc->encountered_congestion = 1; |
339 | - if (sb != blockdev_superblock) | |
339 | + if (!sb_is_blkdev_sb(sb)) | |
340 | 340 | break; /* Skip a congested fs */ |
341 | 341 | list_move(&inode->i_list, &sb->s_dirty); |
342 | 342 | continue; /* Skip a congested blockdev */ |
343 | 343 | } |
344 | 344 | |
345 | 345 | if (wbc->bdi && bdi != wbc->bdi) { |
346 | - if (sb != blockdev_superblock) | |
346 | + if (!sb_is_blkdev_sb(sb)) | |
347 | 347 | break; /* fs has the wrong queue */ |
348 | 348 | list_move(&inode->i_list, &sb->s_dirty); |
349 | 349 | continue; /* blockdev has wrong queue */ |