* [PATCH] writeback: __sync_single_inode() trivial cleanup
[not found] <E1JLUF5-0001rN-JM@localhost.localdomain>
@ 2008-02-03 2:05 ` Fengguang Wu
0 siblings, 0 replies; only message in thread
From: Fengguang Wu @ 2008-02-03 2:05 UTC (permalink / raw)
To: Andrew Morton; +Cc: Michael Rubin, Peter Zijlstra, Linux Kernel Mailing List
Make the if-else straight in __sync_single_inode().
No behavior change.
Cc: Michael Rubin <mrubin@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---
fs/fs-writeback.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
--- linux-mm.orig/fs/fs-writeback.c
+++ linux-mm/fs/fs-writeback.c
@@ -261,8 +261,13 @@ __sync_single_inode(struct inode *inode,
spin_lock(&inode_lock);
inode->i_state &= ~I_SYNC;
if (!(inode->i_state & I_FREEING)) {
- if (!(inode->i_state & I_DIRTY) &&
- mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
+ if (inode->i_state & I_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()
* sometimes bales out without doing anything. Redirty
@@ -306,12 +311,6 @@ __sync_single_inode(struct inode *inode,
inode->i_state |= I_DIRTY_PAGES;
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)) {
/*
* The inode is clean, inuse
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-03 2:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1JLUF5-0001rN-JM@localhost.localdomain>
2008-02-03 2:05 ` [PATCH] writeback: __sync_single_inode() trivial cleanup Fengguang Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox