diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index a9b399402007..1d3683d496f8 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -3051,68 +3051,6 @@ asmlinkage long sys_bdflush(int func, long data) | |||
3051 | } | 3051 | } |
3052 | 3052 | ||
3053 | /* | 3053 | /* |
3054 | * Migration function for pages with buffers. This function can only be used | ||
3055 | * if the underlying filesystem guarantees that no other references to "page" | ||
3056 | * exist. | ||
3057 | */ | ||
3058 | #ifdef CONFIG_MIGRATION | ||
3059 | int buffer_migrate_page(struct page *newpage, struct page *page) | ||
3060 | { | ||
3061 | struct address_space *mapping = page->mapping; | ||
3062 | struct buffer_head *bh, *head; | ||
3063 | int rc; | ||
3064 | |||
3065 | if (!mapping) | ||
3066 | return -EAGAIN; | ||
3067 | |||
3068 | if (!page_has_buffers(page)) | ||
3069 | return migrate_page(newpage, page); | ||
3070 | |||
3071 | head = page_buffers(page); | ||
3072 | |||
3073 | rc = migrate_page_remove_references(newpage, page, 3); | ||
3074 | if (rc) | ||
3075 | return rc; | ||
3076 | |||
3077 | bh = head; | ||
3078 | do { | ||
3079 | get_bh(bh); | ||
3080 | lock_buffer(bh); | ||
3081 | bh = bh->b_this_page; | ||
3082 | |||
3083 | } while (bh != head); | ||
3084 | |||
3085 | ClearPagePrivate(page); | ||
3086 | set_page_private(newpage, page_private(page)); | ||
3087 | set_page_private(page, 0); | ||
3088 | put_page(page); | ||
3089 | get_page(newpage); | ||
3090 | |||
3091 | bh = head; | ||
3092 | do { | ||
3093 | set_bh_page(bh, newpage, bh_offset(bh)); | ||
3094 | bh = bh->b_this_page; | ||
3095 | |||
3096 | } while (bh != head); | ||
3097 | |||
3098 | SetPagePrivate(newpage); | ||
3099 | |||
3100 | migrate_page_copy(newpage, page); | ||
3101 | |||
3102 | bh = head; | ||
3103 | do { | ||
3104 | unlock_buffer(bh); | ||
3105 | put_bh(bh); | ||
3106 | bh = bh->b_this_page; | ||
3107 | |||
3108 | } while (bh != head); | ||
3109 | |||
3110 | return 0; | ||
3111 | } | ||
3112 | EXPORT_SYMBOL(buffer_migrate_page); | ||
3113 | #endif | ||
3114 | |||
3115 | /* | ||
3116 | * Buffer-head allocation | 3054 | * Buffer-head allocation |
3117 | */ | 3055 | */ |
3118 | static kmem_cache_t *bh_cachep; | 3056 | static kmem_cache_t *bh_cachep; |