diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-01-12 09:40:48 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-01-12 09:40:48 +0100 |
commit | dba9532388b00d591d87c638a47dcc7ba3763fc5 (patch) | |
tree | cc9de8cbc40d0e927b1924d1d943208e84e21d1f /fs/fs-writeback.c | |
parent | 78b8d5d2ee280c463908fd75f3bdf246bcb6ac8d (diff) | |
parent | c68db7175f4dcb3d5789bb50bea6376fb81f87fe (diff) | |
download | blackbird-op-linux-dba9532388b00d591d87c638a47dcc7ba3763fc5.tar.gz blackbird-op-linux-dba9532388b00d591d87c638a47dcc7ba3763fc5.zip |
Merge remote branch 'alsa/fixes' into fix/misc
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 49bc1b8e8f19..1a7c42c64ff4 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -242,6 +242,7 @@ static void bdi_sync_writeback(struct backing_dev_info *bdi, /** * bdi_start_writeback - start writeback * @bdi: the backing device to write from + * @sb: write inodes from this super_block * @nr_pages: the number of pages to write * * Description: @@ -1187,6 +1188,23 @@ void writeback_inodes_sb(struct super_block *sb) EXPORT_SYMBOL(writeback_inodes_sb); /** + * writeback_inodes_sb_if_idle - start writeback if none underway + * @sb: the superblock + * + * Invoke writeback_inodes_sb if no writeback is currently underway. + * Returns 1 if writeback was started, 0 if not. + */ +int writeback_inodes_sb_if_idle(struct super_block *sb) +{ + if (!writeback_in_progress(sb->s_bdi)) { + writeback_inodes_sb(sb); + return 1; + } else + return 0; +} +EXPORT_SYMBOL(writeback_inodes_sb_if_idle); + +/** * sync_inodes_sb - sync sb inode pages * @sb: the superblock * |