[ewg] [GIT PULL ofed-1.5] - nfsrdma fix - bug 1699
Steve Wise
swise at opengridcomputing.com
Wed Aug 26 11:12:39 PDT 2009
Vlad,
Please pull from:
ssh://vlad@sofa.openfabrics.org/~swise/scm/ofed_kernel ofed_1_5
This commit fixes bug 1699.
Thanks,
Steve.
----
From: Tom Tucker <tom at opengridcomputing.com>
The code that supports this flag is core fs code that is not and cannot
be shipped as part of NFSRDMA. Use the old flags from the nameidata
structure if LOOKUP_EXCL is not defined.
Signed-off-by: Tom Tucker <tom at opengridcomputing.com>
---
fs/nfs/dir.c | 10 ++++++++++
.../2.6.16_sles10_sp2/include/linux/namei.h | 2 --
.../backport/2.6.18-EL5.2/include/linux/namei.h | 2 --
.../backport/2.6.18-EL5.3/include/linux/namei.h | 2 --
.../backport/2.6.18-EL5.4/include/linux/namei.h | 2 --
.../backport/2.6.22/include/linux/namei.h | 2 --
.../backport/2.6.25/include/linux/namei.h | 2 --
.../backport/2.6.25_suse11/include/linux/namei.h | 2 --
.../backport/2.6.27_sles11/include/linux/namei.h | 2 --
9 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 89f98e9..88c61a8 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -707,7 +707,13 @@ static int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd)
{
if (NFS_PROTO(dir)->version == 2)
return 0;
+#ifdef LOOKUP_EXCL
return nd && nfs_lookup_check_intent(nd, LOOKUP_EXCL);
+#else
+ if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0)
+ return 0;
+ return (nd->intent.open.flags & O_EXCL) != 0;
+#endif
}
/*
@@ -1011,7 +1017,11 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry
/* Let vfs_create() deal with O_EXCL. Instantiate, but don't hash
* the dentry. */
+#ifdef LOOKUP_EXCL
if (nd->flags & LOOKUP_EXCL) {
+#else
+ if (nd->intent.open.flags & O_EXCL) {
+#endif
d_instantiate(dentry, NULL);
goto out;
}
diff --git a/kernel_addons/backport/2.6.16_sles10_sp2/include/linux/namei.h b/kernel_addons/backport/2.6.16_sles10_sp2/include/linux/namei.h
index 77de824..3260aed 100644
--- a/kernel_addons/backport/2.6.16_sles10_sp2/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.16_sles10_sp2/include/linux/namei.h
@@ -3,8 +3,6 @@
#include_next <linux/namei.h>
-#define LOOKUP_EXCL 0x0400
-
struct path {
struct vfsmount *mnt;
struct dentry *dentry;
diff --git a/kernel_addons/backport/2.6.18-EL5.2/include/linux/namei.h b/kernel_addons/backport/2.6.18-EL5.2/include/linux/namei.h
index 77de824..3260aed 100644
--- a/kernel_addons/backport/2.6.18-EL5.2/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.18-EL5.2/include/linux/namei.h
@@ -3,8 +3,6 @@
#include_next <linux/namei.h>
-#define LOOKUP_EXCL 0x0400
-
struct path {
struct vfsmount *mnt;
struct dentry *dentry;
diff --git a/kernel_addons/backport/2.6.18-EL5.3/include/linux/namei.h b/kernel_addons/backport/2.6.18-EL5.3/include/linux/namei.h
index 77de824..3260aed 100644
--- a/kernel_addons/backport/2.6.18-EL5.3/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.18-EL5.3/include/linux/namei.h
@@ -3,8 +3,6 @@
#include_next <linux/namei.h>
-#define LOOKUP_EXCL 0x0400
-
struct path {
struct vfsmount *mnt;
struct dentry *dentry;
diff --git a/kernel_addons/backport/2.6.18-EL5.4/include/linux/namei.h b/kernel_addons/backport/2.6.18-EL5.4/include/linux/namei.h
index 77de824..3260aed 100644
--- a/kernel_addons/backport/2.6.18-EL5.4/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.18-EL5.4/include/linux/namei.h
@@ -3,8 +3,6 @@
#include_next <linux/namei.h>
-#define LOOKUP_EXCL 0x0400
-
struct path {
struct vfsmount *mnt;
struct dentry *dentry;
diff --git a/kernel_addons/backport/2.6.22/include/linux/namei.h b/kernel_addons/backport/2.6.22/include/linux/namei.h
index 9ede722..dcaae42 100644
--- a/kernel_addons/backport/2.6.22/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.22/include/linux/namei.h
@@ -4,8 +4,6 @@
#include_next <linux/namei.h>
#include <linux/path.h>
-#define LOOKUP_EXCL 0x0400
-
static inline int kern_path(const char *name, unsigned int flags, struct path *path)
{
struct nameidata nd;
diff --git a/kernel_addons/backport/2.6.25/include/linux/namei.h b/kernel_addons/backport/2.6.25/include/linux/namei.h
index ef46b08..1e5b451 100644
--- a/kernel_addons/backport/2.6.25/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.25/include/linux/namei.h
@@ -3,8 +3,6 @@
#include_next <linux/namei.h>
-#define LOOKUP_EXCL 0x0400
-
static inline int kern_path(const char *name, unsigned int flags, struct path *path)
{
struct nameidata nd;
diff --git a/kernel_addons/backport/2.6.25_suse11/include/linux/namei.h b/kernel_addons/backport/2.6.25_suse11/include/linux/namei.h
index ef46b08..1e5b451 100644
--- a/kernel_addons/backport/2.6.25_suse11/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.25_suse11/include/linux/namei.h
@@ -3,8 +3,6 @@
#include_next <linux/namei.h>
-#define LOOKUP_EXCL 0x0400
-
static inline int kern_path(const char *name, unsigned int flags, struct path *path)
{
struct nameidata nd;
diff --git a/kernel_addons/backport/2.6.27_sles11/include/linux/namei.h b/kernel_addons/backport/2.6.27_sles11/include/linux/namei.h
index ef46b08..1e5b451 100644
--- a/kernel_addons/backport/2.6.27_sles11/include/linux/namei.h
+++ b/kernel_addons/backport/2.6.27_sles11/include/linux/namei.h
@@ -3,8 +3,6 @@
#include_next <linux/namei.h>
-#define LOOKUP_EXCL 0x0400
-
static inline int kern_path(const char *name, unsigned int flags, struct path *path)
{
struct nameidata nd;
More information about the ewg
mailing list