summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-06 11:11:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-06 11:11:18 -0700
commit089eed29b4021f8b68ec3d1746a1f9b9c4f04783 (patch)
tree0c3624074f6729ebbaf181dbdaccfc4beebd0bc9 /fs
parent34984f54b7e8cb29632e921fb2f47b403c0e617a (diff)
parentaaead25b954879e1a708ff2f3602f494c18d20b5 (diff)
downloadtalos-obmc-linux-089eed29b4021f8b68ec3d1746a1f9b9c4f04783.tar.gz
talos-obmc-linux-089eed29b4021f8b68ec3d1746a1f9b9c4f04783.zip
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: writeback: always use sb->s_bdi for writeback purposes
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 5581122bd2c0..ab38fef1c9a1 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -72,22 +72,11 @@ int writeback_in_progress(struct backing_dev_info *bdi)
static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
{
struct super_block *sb = inode->i_sb;
- struct backing_dev_info *bdi = inode->i_mapping->backing_dev_info;
- /*
- * For inodes on standard filesystems, we use superblock's bdi. For
- * inodes on virtual filesystems, we want to use inode mapping's bdi
- * because they can possibly point to something useful (think about
- * block_dev filesystem).
- */
- if (sb->s_bdi && sb->s_bdi != &noop_backing_dev_info) {
- /* Some device inodes could play dirty tricks. Catch them... */
- WARN(bdi != sb->s_bdi && bdi_cap_writeback_dirty(bdi),
- "Dirtiable inode bdi %s != sb bdi %s\n",
- bdi->name, sb->s_bdi->name);
- return sb->s_bdi;
- }
- return bdi;
+ if (strcmp(sb->s_type->name, "bdev") == 0)
+ return inode->i_mapping->backing_dev_info;
+
+ return sb->s_bdi;
}
static void bdi_queue_work(struct backing_dev_info *bdi,
OpenPOWER on IntegriCloud