aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-30 16:25:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-30 16:25:56 -0500
commit1f11abc966b82b9fd0c834707486ef301b2f398d (patch)
tree4e9d49b00ab034f1fc7f11cb1ff54e3121a728ae /fs/fs-writeback.c
parentf8e9766dd1bacd5f32f9ac4322b55fbfd46b778e (diff)
parent0637c6f4135f592f094207c7c21e7c0fc5557834 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: Patch up how we claim metadata blocks for quota purposes ext4: Ensure zeroout blocks have no dirty metadata ext4: return correct wbc.nr_to_write in ext4_da_writepages ext4: Update documentation to correct the inode_readahead_blks option name jbd2: don't use __GFP_NOFAIL in journal_init_common() ext4: flush delalloc blocks when space is low fs-writeback: Add helper function to start writeback if idle ext4: Eliminate potential double free on error path ext4: fix unsigned long long printk warning in super.c ext4, jbd2: Add barriers for file systems with exernal journals ext4: replace BUG() with return -EIO in ext4_ext_get_blocks ext4: add module aliases for ext2 and ext3 ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured ext4: remove unused #include <linux/version.h>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 49bc1b8e8f19..f6c2155e0026 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1187,6 +1187,23 @@ void writeback_inodes_sb(struct super_block *sb)
1187EXPORT_SYMBOL(writeback_inodes_sb); 1187EXPORT_SYMBOL(writeback_inodes_sb);
1188 1188
1189/** 1189/**
1190 * writeback_inodes_sb_if_idle - start writeback if none underway
1191 * @sb: the superblock
1192 *
1193 * Invoke writeback_inodes_sb if no writeback is currently underway.
1194 * Returns 1 if writeback was started, 0 if not.
1195 */
1196int writeback_inodes_sb_if_idle(struct super_block *sb)
1197{
1198 if (!writeback_in_progress(sb->s_bdi)) {
1199 writeback_inodes_sb(sb);
1200 return 1;
1201 } else
1202 return 0;
1203}
1204EXPORT_SYMBOL(writeback_inodes_sb_if_idle);
1205
1206/**
1190 * sync_inodes_sb - sync sb inode pages 1207 * sync_inodes_sb - sync sb inode pages
1191 * @sb: the superblock 1208 * @sb: the superblock
1192 * 1209 *