[PATCH] Re: [2.6.8-rc4-bk] NFS oops on x86-64

From: Jeff Garzik
Date: Fri Aug 13 2004 - 22:26:02 EST


Yep, the attached patch fixes NFS on both x86 and x86-64.

===== fs/nfs/file.c 1.40 vs edited =====
--- 1.40/fs/nfs/file.c 2004-08-09 14:58:00 -04:00
+++ edited/fs/nfs/file.c 2004-08-13 22:54:01 -04:00
@@ -72,7 +72,7 @@

static int nfs_check_flags(int flags)
{
- if (flags & (O_APPEND | O_DIRECT))
+ if ((flags & (O_APPEND | O_DIRECT)) == (O_APPEND | O_DIRECT))
return -EINVAL;

return 0;
@@ -89,7 +89,7 @@
int res;

res = nfs_check_flags(filp->f_flags);
- if (!res)
+ if (res)
return res;

lock_kernel();