diff options
author | Mark Brown <broonie@linaro.org> | 2014-01-27 14:57:42 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-27 14:57:42 +0000 |
commit | 0f3550b731084e2790caf1d73bfe0e3a454aafae (patch) | |
tree | 96e387b7ae0da48c3ac13dd5ce922c983bc5debb /fs/fs-writeback.c | |
parent | b7e46105cae50b29ac0b08e2e3c04b5ca34bc2a5 (diff) | |
parent | 51ad557e21b8713f3abc286c14bca4ed01b8e56d (diff) |
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidlsk-android-14.01
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index b6b092696a5..a941933cb0e 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -505,13 +505,16 @@ writeback_single_inode(struct inode *inode, struct bdi_writeback *wb, } WARN_ON(inode->i_state & I_SYNC); /* - * Skip inode if it is clean. We don't want to mess with writeback - * lists in this function since flusher thread may be doing for example - * sync in parallel and if we move the inode, it could get skipped. So - * here we make sure inode is on some writeback list and leave it there - * unless we have completely cleaned the inode. + * Skip inode if it is clean and we have no outstanding writeback in + * WB_SYNC_ALL mode. We don't want to mess with writeback lists in this + * function since flusher thread may be doing for example sync in + * parallel and if we move the inode, it could get skipped. So here we + * make sure inode is on some writeback list and leave it there unless + * we have completely cleaned the inode. */ - if (!(inode->i_state & I_DIRTY)) + if (!(inode->i_state & I_DIRTY) && + (wbc->sync_mode != WB_SYNC_ALL || + !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_WRITEBACK))) goto out; inode->i_state |= I_SYNC; spin_unlock(&inode->i_lock); |