mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
writeback: cleanup writeback_single_inode()
Make the if-else straight in writeback_single_inode(). No behavior change. Cc: Jan Kara <jack@suse.cz> Cc: Michael Rubin <mrubin@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
7fbdea3232
commit
ae1b7f7d4b
1 changed files with 7 additions and 8 deletions
|
@ -449,8 +449,13 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
|
||||||
spin_lock(&inode_lock);
|
spin_lock(&inode_lock);
|
||||||
inode->i_state &= ~I_SYNC;
|
inode->i_state &= ~I_SYNC;
|
||||||
if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
|
if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
|
||||||
if (!(inode->i_state & I_DIRTY) &&
|
if (inode->i_state & I_DIRTY) {
|
||||||
mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
|
/*
|
||||||
|
* Someone redirtied the inode while were writing back
|
||||||
|
* the pages.
|
||||||
|
*/
|
||||||
|
redirty_tail(inode);
|
||||||
|
} else if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
|
||||||
/*
|
/*
|
||||||
* We didn't write back all the pages. nfs_writepages()
|
* We didn't write back all the pages. nfs_writepages()
|
||||||
* sometimes bales out without doing anything. Redirty
|
* sometimes bales out without doing anything. Redirty
|
||||||
|
@ -494,12 +499,6 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
|
||||||
inode->i_state |= I_DIRTY_PAGES;
|
inode->i_state |= I_DIRTY_PAGES;
|
||||||
redirty_tail(inode);
|
redirty_tail(inode);
|
||||||
}
|
}
|
||||||
} else if (inode->i_state & I_DIRTY) {
|
|
||||||
/*
|
|
||||||
* Someone redirtied the inode while were writing back
|
|
||||||
* the pages.
|
|
||||||
*/
|
|
||||||
redirty_tail(inode);
|
|
||||||
} else if (atomic_read(&inode->i_count)) {
|
} else if (atomic_read(&inode->i_count)) {
|
||||||
/*
|
/*
|
||||||
* The inode is clean, inuse
|
* The inode is clean, inuse
|
||||||
|
|
Loading…
Reference in a new issue