From: Manish Singh <manish.singh@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] start centralizing kernel compat mess
Date: Wed Jun 2 19:09:57 2004 [thread overview]
Message-ID: <20040603000947.GA17151@ca-server1.us.oracle.com> (raw)
In-Reply-To: <20040602091432.GC22363@lst.de>
Committed all your patches posted today to trunk, except for this one,
which went on the format-changes branch since we have an ocfs_compat.h
in place there already. Thanks!
-Manish
On Wed, Jun 02, 2004 at 11:14:32AM +0200, Christoph Hellwig wrote:
>
> Index: src/inode.c
> ===================================================================
> --- src/inode.c (revision 969)
> +++ src/inode.c (working copy)
> @@ -33,6 +33,8 @@
> #include "inc/ocfs.h"
> #include "inc/ocfs_journal.h"
>
> +#include "kcompat.h"
> +
> #define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_INODE
>
> extern struct semaphore recovery_list_sem;
> @@ -790,11 +792,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;
> @@ -802,11 +800,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;
> Index: src/symlink.c
> ===================================================================
> --- src/symlink.c (revision 969)
> +++ src/symlink.c (working copy)
> @@ -34,10 +34,11 @@
>
> #include <linux/types.h>
> #include <linux/slab.h>
> +#include <linux/utsname.h>
>
> #include "inc/ocfs_log.h"
> #include "inc/ocfs.h"
> -#include <linux/utsname.h>
> +#include "kcompat.h"
>
> #define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_SYMLINK
>
> @@ -160,15 +161,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);
> --- /dev/null 2004-05-30 14:45:31.000000000 +0200
> +++ src/kcompat.h 2004-06-02 11:05:24.430188496 +0200
> @@ -0,0 +1,12 @@
> +#ifndef _KCOMPAT_H
> +#define _KCOMPAT_H
> +
> +#include <linux/version.h>
> +
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
> +#define wait_on_page_locked(p) wait_on_page(p)
> +#define unlock_page(p) UnlockPage(p)
> +#define Page_Uptodate(p) PageUptodate(p)
> +#endif
> +
> +#endif /* _KCOMPAT_H */
prev parent reply other threads:[~2004-06-02 19:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-02 13:10 [Ocfs2-devel] [PATCH] start centralizing kernel compat mess Christoph Hellwig
2004-06-02 19:09 ` Manish Singh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040603000947.GA17151@ca-server1.us.oracle.com \
--to=manish.singh@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.