diff options
Diffstat (limited to 'fs/afs/write.c')
-rw-r--r-- | fs/afs/write.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c index 83ff29262816..aa03d43984b3 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c | |||
@@ -122,7 +122,7 @@ static int afs_prepare_page(struct afs_vnode *vnode, struct page *page, | |||
122 | if (offset == 0 && to == PAGE_SIZE) | 122 | if (offset == 0 && to == PAGE_SIZE) |
123 | return 0; | 123 | return 0; |
124 | 124 | ||
125 | p = kmap(page); | 125 | p = kmap_atomic(page, KM_USER0); |
126 | 126 | ||
127 | i_size = i_size_read(&vnode->vfs_inode); | 127 | i_size = i_size_read(&vnode->vfs_inode); |
128 | pos = (loff_t) page->index << PAGE_SHIFT; | 128 | pos = (loff_t) page->index << PAGE_SHIFT; |
@@ -133,7 +133,7 @@ static int afs_prepare_page(struct afs_vnode *vnode, struct page *page, | |||
133 | memset(p, 0, offset); | 133 | memset(p, 0, offset); |
134 | if (to < PAGE_SIZE) | 134 | if (to < PAGE_SIZE) |
135 | memset(p + to, 0, PAGE_SIZE - to); | 135 | memset(p + to, 0, PAGE_SIZE - to); |
136 | kunmap(page); | 136 | kunmap_atomic(p, KM_USER0); |
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
@@ -152,7 +152,7 @@ static int afs_prepare_page(struct afs_vnode *vnode, struct page *page, | |||
152 | memset(p + eof, 0, PAGE_SIZE - eof); | 152 | memset(p + eof, 0, PAGE_SIZE - eof); |
153 | } | 153 | } |
154 | 154 | ||
155 | kunmap(p); | 155 | kunmap_atomic(p, KM_USER0); |
156 | 156 | ||
157 | ret = 0; | 157 | ret = 0; |
158 | if (offset > 0 || eof > to) { | 158 | if (offset > 0 || eof > to) { |
@@ -489,14 +489,6 @@ int afs_writepage(struct page *page, struct writeback_control *wbc) | |||
489 | 489 | ||
490 | _enter("{%lx},", page->index); | 490 | _enter("{%lx},", page->index); |
491 | 491 | ||
492 | if (wbc->sync_mode != WB_SYNC_NONE) | ||
493 | wait_on_page_writeback(page); | ||
494 | |||
495 | if (PageWriteback(page) || !PageDirty(page)) { | ||
496 | unlock_page(page); | ||
497 | return 0; | ||
498 | } | ||
499 | |||
500 | wb = (struct afs_writeback *) page_private(page); | 492 | wb = (struct afs_writeback *) page_private(page); |
501 | ASSERT(wb != NULL); | 493 | ASSERT(wb != NULL); |
502 | 494 | ||