This is a note to let you know that I've just added the patch titled
NFS: Fix NFSv3 exclusive open semantics
to the 2.6.37-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nfs-fix-nfsv3-exclusive-open-semantics.patch
and it can be found in the queue-2.6.37 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 8a0eebf66e3b1deae036553ba641a9c2bdbae678 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Thu, 13 Jan 2011 14:15:50 -0500
Subject: NFS: Fix NFSv3 exclusive open semantics
From: Trond Myklebust <[email protected]>
commit 8a0eebf66e3b1deae036553ba641a9c2bdbae678 upstream.
Commit c0204fd2b8fe047b18b67e07e1bf2a03691240cd (NFS: Clean up
nfs4_proc_create()) broke NFSv3 exclusive open by removing the code
that passes the O_EXCL flag down to nfs3_proc_create(). This patch
reverts that offending hunk from the original commit.
Reported-by: Nick Bowler <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Tested-by: Nick Bowler <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/nfs/dir.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1577,6 +1577,7 @@ static int nfs_create(struct inode *dir,
{
struct iattr attr;
int error;
+ int open_flags = 0;
dfprintk(VFS, "NFS: create(%s/%ld), %s\n",
dir->i_sb->s_id, dir->i_ino, dentry->d_name.name);
@@ -1584,7 +1585,10 @@ static int nfs_create(struct inode *dir,
attr.ia_mode = mode;
attr.ia_valid = ATTR_MODE;
- error = NFS_PROTO(dir)->create(dir, dentry, &attr, 0, NULL);
+ if ((nd->flags & LOOKUP_CREATE) != 0)
+ open_flags = nd->intent.open.flags;
+
+ error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, NULL);
if (error != 0)
goto out_err;
return 0;
Patches currently in stable-queue which might be from
[email protected] are
queue-2.6.37/nfs-don-t-use-vm_map_ram-in-readdir.patch
queue-2.6.37/nfs-fix-kernel-bug-at-fs-aio.c-554.patch
queue-2.6.37/nfsd4-name-id-mapping-should-fail-with-badowner-not-badname.patch
queue-2.6.37/nfs-fix-an-nfs-client-lockdep-issue.patch
queue-2.6.37/nfs-fix-nfsv3-exclusive-open-semantics.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable