diff options
author | David Howells <dhowells@redhat.com> | 2007-05-10 03:15:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-10 09:26:52 -0700 |
commit | b9b1f8d5930a813879278d0cbfc8c658d6a038dc (patch) | |
tree | 1879e0e70ce946e3519a205698f4dd1b34a3a7ea /fs/afs/write.c | |
parent | 218e180e7ea5334e1f94121940ba82cd1f0f4e58 (diff) |
AFS: write support fixes
AFS write support fixes:
(1) Support large files using the 64-bit file access operations if available
on the server.
(2) Use kmap_atomic() rather than kmap() in afs_prepare_page().
(3) Don't do stuff in afs_writepage() that's done by the caller.
[akpm@linux-foundation.org: fix right shift count >= width of type]
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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, if (offset == 0 && to == PAGE_SIZE) return 0; - p = kmap(page); + p = kmap_atomic(page, KM_USER0); i_size = i_size_read(&vnode->vfs_inode); pos = (loff_t) page->index << PAGE_SHIFT; @@ -133,7 +133,7 @@ static int afs_prepare_page(struct afs_vnode *vnode, struct page *page, memset(p, 0, offset); if (to < PAGE_SIZE) memset(p + to, 0, PAGE_SIZE - to); - kunmap(page); + kunmap_atomic(p, KM_USER0); return 0; } @@ -152,7 +152,7 @@ static int afs_prepare_page(struct afs_vnode *vnode, struct page *page, memset(p + eof, 0, PAGE_SIZE - eof); } - kunmap(p); + kunmap_atomic(p, KM_USER0); ret = 0; if (offset > 0 || eof > to) { @@ -489,14 +489,6 @@ int afs_writepage(struct page *page, struct writeback_control *wbc) _enter("{%lx},", page->index); - if (wbc->sync_mode != WB_SYNC_NONE) - wait_on_page_writeback(page); - - if (PageWriteback(page) || !PageDirty(page)) { - unlock_page(page); - return 0; - } - wb = (struct afs_writeback *) page_private(page); ASSERT(wb != NULL); |