diff -urN pvfs-2.7.1/src/kernel/linux-2.6/dir.c pvfs-2.7.1-RHEL3/src/kernel/linux-2.6/dir.c --- pvfs-2.7.1/src/kernel/linux-2.6/dir.c 2008-04-14 10:37:32.000000000 -0500 +++ pvfs-2.7.1-RHEL3/src/kernel/linux-2.6/dir.c 2008-12-01 14:40:35.000000000 -0600 @@ -899,7 +899,6 @@ readdir : pvfs2_readdir, open : pvfs2_file_open, release : pvfs2_file_release, - llseek : pvfs2_dir_llseek #else .read = generic_read_dir, .readdir = pvfs2_readdir, diff -urN pvfs-2.7.1/src/kernel/linux-2.6/file.c pvfs-2.7.1-RHEL3/src/kernel/linux-2.6/file.c --- pvfs-2.7.1/src/kernel/linux-2.6/file.c 2008-04-14 10:37:32.000000000 -0500 +++ pvfs-2.7.1-RHEL3/src/kernel/linux-2.6/file.c 2008-12-01 14:13:03.000000000 -0600 @@ -295,6 +295,8 @@ return ret; } +#ifndef PVFS2_LINUX_KERNEL_2_4 + /* Copy from page-cache to application address space * @rw - operation context, contains information about the I/O operation * and holds the pointers to the page-cache page array from which @@ -420,6 +422,8 @@ return 0; } +#endif //#ifndef PVFS2_LINUX_KERNEL_2_4 + /* * Post and wait for the I/O upcall to finish * @rw - contains state information to initiate the I/O operation @@ -701,11 +705,14 @@ return max_nr_iovecs; } +#ifndef PVFS2_LINUX_KERNEL_2_4 + #ifdef HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE #define pg_ref_count(pg) atomic_read(&(pg)->count) #else #define pg_ref_count(pg) atomic_read(&(pg)->_count) #endif + /* * Cleaning up pages in the cache involves dropping the reference count * while cleaning up pages that were newly allocated involves unlocking @@ -772,6 +779,7 @@ return 0; } + #if defined(HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT) #define lock_mapping_tree(mapping) spin_lock(&mapping->page_lock) #define unlock_mapping_tree(mapping) spin_unlock(&mapping->page_lock) @@ -1169,6 +1177,7 @@ cleanup_cache_pages(rw.dest.pages.nr_pages, &rw, err); return err == 0 ? total_actual_io : err; } +#endif //#ifndef PVFS2_LINUX_KERNEL_2_4 /* * Common entry point for read/write/readv/writev @@ -1344,13 +1353,16 @@ /* how much to transfer in this loop iteration */ each_count = (((count - total_count) > pvfs_bufmap_size_query()) ? pvfs_bufmap_size_query() : (count - total_count)); +#ifndef PVFS2_LINUX_KERNEL_2_4 /* if a file is immutable, stage its I/O * through the cache */ if (IS_IMMUTABLE(rw->inode)) { /* Stage the I/O through the kernel's pagecache */ ret = wait_for_cached_io(rw, ptr, seg_array[seg], each_count); } - else { + else +#endif /* PVFS2_LINUX_KERNEL_2_4 */ + { /* push the I/O directly through to storage */ ret = wait_for_direct_io(rw, ptr, seg_array[seg], each_count); } diff -urN pvfs-2.7.1/src/kernel/linux-2.6/super.c pvfs-2.7.1-RHEL3/src/kernel/linux-2.6/super.c --- pvfs-2.7.1/src/kernel/linux-2.6/super.c 2008-04-14 10:37:32.000000000 -0500 +++ pvfs-2.7.1-RHEL3/src/kernel/linux-2.6/super.c 2008-12-01 14:38:31.000000000 -0600 @@ -1302,9 +1302,6 @@ /* free the pvfs2 superblock private data */ kfree(PVFS2_SB(sb)); -#else - sb->u.generic_sbp = NULL; -#endif { int count1, count2; count1 = atomic_read(&pvfs2_inode_alloc_count); @@ -1320,6 +1317,9 @@ count1, count2); } } +#else + sb->u.generic_sbp = NULL; +#endif } else {