[Ocfs2-commits]
manish commits r984 - in branches/format-changes/src: . inc
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Jun 2 20:08:10 CDT 2004
Author: manish
Date: 2004-06-02 19:08:09 -0500 (Wed, 02 Jun 2004)
New Revision: 984
Modified:
branches/format-changes/src/inc/ocfs_compat.h
branches/format-changes/src/inode.c
branches/format-changes/src/symlink.c
Log:
Compat defines for wait_on_page_locked, unlock_page, and Page_Uptodate.
>From Christoph Hellwig.
Modified: branches/format-changes/src/inc/ocfs_compat.h
===================================================================
--- branches/format-changes/src/inc/ocfs_compat.h 2004-06-03 00:04:02 UTC (rev 983)
+++ branches/format-changes/src/inc/ocfs_compat.h 2004-06-03 00:08:09 UTC (rev 984)
@@ -48,6 +48,10 @@
#define ocfs_get_seconds(t) (t)
+#define wait_on_page_locked(p) wait_on_page(p)
+#define unlock_page(p) UnlockPage(p)
+#define Page_Uptodate(p) PageUptodate(p)
+
#else /* LINUX_VERSION_CODE < 2.6 */
#define OCFS_GENERIC_SB_MEMBER(sb) ((sb)->s_fs_info)
Modified: branches/format-changes/src/inode.c
===================================================================
--- branches/format-changes/src/inode.c 2004-06-03 00:04:02 UTC (rev 983)
+++ branches/format-changes/src/inode.c 2004-06-03 00:08:09 UTC (rev 984)
@@ -804,11 +804,7 @@
memcpy (kaddr, symname, len - 1);
mapping->a_ops->commit_write (NULL, page, 0, len - 1);
err = mapping->a_ops->readpage (NULL, page);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
wait_on_page_locked (page);
-#else
- wait_on_page (page);
-#endif
page_cache_release (page);
if (err < 0)
goto fail;
@@ -816,11 +812,7 @@
return 0;
fail_map:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
unlock_page (page);
-#else
- UnlockPage (page);
-#endif
page_cache_release (page);
fail:
return err;
Modified: branches/format-changes/src/symlink.c
===================================================================
--- branches/format-changes/src/symlink.c 2004-06-03 00:04:02 UTC (rev 983)
+++ branches/format-changes/src/symlink.c 2004-06-03 00:08:09 UTC (rev 984)
@@ -36,10 +36,10 @@
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
+#include <linux/utsname.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
-#include <linux/utsname.h>
#define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_SYMLINK
@@ -162,15 +162,8 @@
NULL);
if (IS_ERR(page))
goto sync_fail;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
wait_on_page_locked(page);
if (!PageUptodate(page))
-
-#else
- wait_on_page(page);
- if (!Page_Uptodate(page))
-
-#endif
goto async_fail;
*ppage = page;
return kmap(page);
More information about the Ocfs2-commits
mailing list