vxfs_immed.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) vxfs_immed.c (09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a)
1/*
2 * Copyright (c) 2000-2001 Christoph Hellwig.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 52 unchanged lines hidden (view full) ---

61 *
62 * Locking status:
63 * @page is locked and will be unlocked.
64 */
65static int
66vxfs_immed_readpage(struct file *fp, struct page *pp)
67{
68 struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host);
1/*
2 * Copyright (c) 2000-2001 Christoph Hellwig.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 52 unchanged lines hidden (view full) ---

61 *
62 * Locking status:
63 * @page is locked and will be unlocked.
64 */
65static int
66vxfs_immed_readpage(struct file *fp, struct page *pp)
67{
68 struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host);
69 u_int64_t offset = (u_int64_t)pp->index << PAGE_CACHE_SHIFT;
69 u_int64_t offset = (u_int64_t)pp->index << PAGE_SHIFT;
70 caddr_t kaddr;
71
72 kaddr = kmap(pp);
70 caddr_t kaddr;
71
72 kaddr = kmap(pp);
73 memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_CACHE_SIZE);
73 memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE);
74 kunmap(pp);
75
76 flush_dcache_page(pp);
77 SetPageUptodate(pp);
78 unlock_page(pp);
79
80 return 0;
81}
74 kunmap(pp);
75
76 flush_dcache_page(pp);
77 SetPageUptodate(pp);
78 unlock_page(pp);
79
80 return 0;
81}