]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/affs/file.c
affs: use zero_user_page
[mirror_ubuntu-zesty-kernel.git] / fs / affs / file.c
index 05b5e22de759e10513301ac7b441bc4127c3b492..c8796906f584bdb2bffe406e186b4f17e6aa5c75 100644 (file)
@@ -38,7 +38,7 @@ const struct file_operations affs_file_operations = {
        .sendfile       = generic_file_sendfile,
 };
 
-struct inode_operations affs_file_inode_operations = {
+const struct inode_operations affs_file_inode_operations = {
        .truncate       = affs_truncate,
        .setattr        = affs_notify_change,
 };
@@ -628,11 +628,7 @@ static int affs_prepare_write_ofs(struct file *file, struct page *page, unsigned
                        return err;
        }
        if (to < PAGE_CACHE_SIZE) {
-               char *kaddr = kmap_atomic(page, KM_USER0);
-
-               memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
-               flush_dcache_page(page);
-               kunmap_atomic(kaddr, KM_USER0);
+               zero_user_page(page, to, PAGE_CACHE_SIZE - to, KM_USER0);
                if (size > offset + to) {
                        if (size < offset + PAGE_CACHE_SIZE)
                                tmp = size & ~PAGE_CACHE_MASK;