From 6639566b805c740bcecd127b0796bff92ad531cc Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Tue, 2 Aug 2005 06:09:50 +0000 Subject: [PATCH] STABLE14-linux-4gb-32bit-file-fix-20050802 FIXCES 20560 fix wrapping error on page offset (cherry picked from commit 4778f1fc153c5164b692866f1460e8ec58012de6) --- src/afs/LINUX/osi_sleep.c | 4 ++-- src/afs/LINUX/osi_vnodeops.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/afs/LINUX/osi_sleep.c b/src/afs/LINUX/osi_sleep.c index 33b53d79a..c0e4072bb 100644 --- a/src/afs/LINUX/osi_sleep.c +++ b/src/afs/LINUX/osi_sleep.c @@ -193,7 +193,7 @@ afs_osi_SleepSig(void *event) AFS_GUNLOCK(); schedule(); #ifdef AFS_LINUX26_ENV -#ifdef CONFIG_PF +#ifdef CONFIG_PM if (current->flags & PF_FREEZE) refrigerator(PF_FREEZE); #endif @@ -277,7 +277,7 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok) } else schedule_timeout(ticks); #ifdef AFS_LINUX26_ENV -#ifdef CONFIG_PF +#ifdef CONFIG_PM if (current->flags & PF_FREEZE) refrigerator(PF_FREEZE); #endif diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 18f9fbed3..fc9fcfc48 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1263,7 +1263,7 @@ afs_linux_readpage(struct file *fp, struct page *pp) cred_t *credp = crref(); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) char *address; - afs_offs_t offset = pp->index << PAGE_CACHE_SHIFT; + afs_offs_t offset = page_offset(pp); #else ulong address = afs_linux_page_address(pp); afs_offs_t offset = pageoff(pp); @@ -1359,7 +1359,7 @@ afs_linux_writepage_sync(struct inode *ip, struct page *pp, int f_flags = 0; buffer = kmap(pp) + offset; - base = (pp->index << PAGE_CACHE_SHIFT) + offset; + base = page_offset(pp) + offset; credp = crref(); lock_kernel(); -- 2.39.5