]> err.no Git - linux-2.6/blobdiff - fs/buffer.c
[NETNS][IPV6]: Add ipv6 structure for netns.
[linux-2.6] / fs / buffer.c
index a406cfd89e3bc184dea41e7da231449ea2c9d112..7249e014819e1a0432621d1d2576fd259f27632d 100644 (file)
@@ -710,6 +710,8 @@ static int __set_page_dirty(struct page *page,
 
                if (mapping_cap_account_dirty(mapping)) {
                        __inc_zone_page_state(page, NR_FILE_DIRTY);
+                       __inc_bdi_stat(mapping->backing_dev_info,
+                                       BDI_RECLAIMABLE);
                        task_io_account_write(PAGE_CACHE_SIZE);
                }
                radix_tree_tag_set(&mapping->page_tree,
@@ -1728,7 +1730,6 @@ done:
                 * The page and buffer_heads can be released at any time from
                 * here on.
                 */
-               wbc->pages_skipped++;   /* We didn't write this page */
        }
        return err;
 
@@ -2562,7 +2563,7 @@ int nobh_write_end(struct file *file, struct address_space *mapping,
                        struct page *page, void *fsdata)
 {
        struct inode *inode = page->mapping->host;
-       struct buffer_head *head = NULL;
+       struct buffer_head *head = fsdata;
        struct buffer_head *bh;
 
        if (!PageMappedToDisk(page)) {
@@ -2583,7 +2584,6 @@ int nobh_write_end(struct file *file, struct address_space *mapping,
        unlock_page(page);
        page_cache_release(page);
 
-       head = fsdata;
        while (head) {
                bh = head;
                head = head->b_this_page;
@@ -3169,7 +3169,8 @@ static void recalc_bh_state(void)
        
 struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
 {
-       struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags);
+       struct buffer_head *ret = kmem_cache_zalloc(bh_cachep,
+                               set_migrateflags(gfp_flags, __GFP_RECLAIMABLE));
        if (ret) {
                INIT_LIST_HEAD(&ret->b_assoc_buffers);
                get_cpu_var(bh_accounting).nr++;