[Ocfs2-devel] [PATCH] remove pre-2.4.21 compat code

Mark Fasheh mark.fasheh at oracle.com
Fri Sep 3 18:01:30 CDT 2004


Hello,

On Fri, Sep 03, 2004 at 11:12:29AM +0200, Christoph Hellwig wrote:
<snip> 
> Index: src/aops.c
> ===================================================================
> --- src/aops.c	(revision 1418)
> +++ src/aops.c	(working copy)
> @@ -609,8 +609,8 @@
>  	LOG_CLEAR_CONTEXT();
>  	return ret;
>  }				/* ocfs_direct_IO */
> +#else
>  
> -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10)
>  /*
>   * ocfs_direct_IO()
>   *
> @@ -618,7 +618,7 @@
>   * we should never get here any more
>   * so let's just BUG(), hint from sct at redhat.com
>   */
> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined(SUSE)
> +#ifdef SUSE
>  static int ocfs_direct_IO (int rw, struct file *filp, struct kiobuf *iobuf, unsigned long blocknr, int blocksize)
>  {
>  	BUG();
> @@ -631,7 +631,7 @@
>  	return 0;
>  }				/* ocfs_direct_IO */
>  #endif
> -#endif  /* version >= 2.4.10 */
> +#endif
I think over here you really mean this:

  * we should never get here any more
  * so let's just BUG(), hint from sct at redhat.com
  */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined(SUSE)
 static int ocfs_direct_IO (int rw, struct file *filp, struct kiobuf *iobuf,
unsigned long blocknr, int blocksize)
 {
        BUG();
        return 0;
 }                              /* ocfs_direct_IO */
-#else
-static int ocfs_direct_IO (int rw, struct inode *inode, struct kiobuf
*iobuf, unsigned long blocknr, int blocksize)
-{
-       BUG();
-       return 0;
-}                              /* ocfs_direct_IO */
 #endif
-#endif  /* version >= 2.4.10 */

Otherwise, it looks good, thanks!
	--Mark

--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh at oracle.com


More information about the Ocfs2-devel mailing list