• Andrew Morton's avatar
    writeback: fix time ordering of the per superblock dirty inode lists 4 · c986d1e2
    Andrew Morton authored
    When the kupdate function has tried to write back an expired inode it will
    then check to see whether some of the inode's pages are still dirty.
    
    This can happen when the filesystem decided to not write a page for some
    reason.  But it does _not_ occur due to redirtyings: a redirtying will set
    I_DIRTY_PAGES.
    
    What we need to do here is to set I_DIRTY_PAGES to reflect reality and to then
    put the inode onto the _head_ of s_dirty for consideration on the next kupdate
    pass, in five seconds time.
    
    Problem is, the code failed to modify the inode's timestamp when pushing the
    inode onto thehead of s_dirty.
    
    The patch:
    
    If there are no other inodes on s_dirty then we leave the inode's timestamp
    alone: it is already expired.
    
    If there _are_ other inodes on s_dirty then we arrange for this inode to get
    the same timestamp as the inode which is at the head of s_dirty, thus
    preserving the s_dirty ordering.  But we only need to do this if this inode
    purports to have been dirtied before the one at head-of-list.
    
    Cc: Mike Waychison <mikew@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c986d1e2
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
usr Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...