diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-08-05 23:56:54 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-08-05 23:56:54 +0200 |
commit | c00aafcd4977769e8728292302ddbbb8b1082fab (patch) | |
tree | 5766bcfbfd7b24816b54298b8ef34054f8cf0fae /fs/nilfs2/segment.c | |
parent | 2e6713c7662cc5ebc7346b033c404cb2f708fd51 (diff) | |
parent | 90bc1a658a53f8832ee799685703977a450e5af9 (diff) | |
download | kernel_goldelico_gta04-c00aafcd4977769e8728292302ddbbb8b1082fab.zip kernel_goldelico_gta04-c00aafcd4977769e8728292302ddbbb8b1082fab.tar.gz kernel_goldelico_gta04-c00aafcd4977769e8728292302ddbbb8b1082fab.tar.bz2 |
Merge branch 'master' into for-linus
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 8b5e477..51ff3d0 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -1859,12 +1859,26 @@ static void nilfs_end_page_io(struct page *page, int err) if (!page) return; - if (buffer_nilfs_node(page_buffers(page)) && !PageWriteback(page)) + if (buffer_nilfs_node(page_buffers(page)) && !PageWriteback(page)) { /* * For b-tree node pages, this function may be called twice * or more because they might be split in a segment. */ + if (PageDirty(page)) { + /* + * For pages holding split b-tree node buffers, dirty + * flag on the buffers may be cleared discretely. + * In that case, the page is once redirtied for + * remaining buffers, and it must be cancelled if + * all the buffers get cleaned later. + */ + lock_page(page); + if (nilfs_page_buffers_clean(page)) + __nilfs_clear_page_dirty(page); + unlock_page(page); + } return; + } __nilfs_end_page_io(page, err); } |