X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Ffs-writeback.c;h=8e050fa58218cdac75ad6a49771a224e3d7b7c61;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=6d0e70efd39905328a9663b5b376bf781a6e7daa;hpb=e3f6fb6212a7102bdb56ba38fa1e98fe72950475;p=linux-2.6.git diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 6d0e70efd..8e050fa58 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -315,7 +315,7 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc) struct backing_dev_info *bdi = mapping->backing_dev_info; long pages_skipped; - if (bdi->memory_backed) { + if (!bdi_cap_writeback_dirty(bdi)) { list_move(&inode->i_list, &sb->s_dirty); if (sb == blockdev_superblock) { /* @@ -512,7 +512,8 @@ restart: } /** - * sync_inodes + * sync_inodes - writes all inodes to disk + * @wait: wait for completion * * sync_inodes() goes through each super block's dirty inode list, writes the * inodes out, waits on the writeout and puts the inodes back on the normal @@ -566,7 +567,7 @@ int write_inode_now(struct inode *inode, int sync) .sync_mode = WB_SYNC_ALL, }; - if (inode->i_mapping->backing_dev_info->memory_backed) + if (!mapping_cap_writeback_dirty(inode->i_mapping)) return 0; might_sleep(); @@ -604,6 +605,7 @@ EXPORT_SYMBOL(sync_inode); /** * generic_osync_inode - flush all dirty data for a given inode to disk * @inode: inode to write + * @mapping: the address_space that should be flushed * @what: what to write and wait upon * * This can be called by file_write functions for files which have the