]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] knfsd: Don't mess with the 'mode' when storing a exclusive-create cookie
authorPeter Staubach <staubach@redhat.com>
Fri, 26 Jan 2007 08:57:00 +0000 (00:57 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 26 Jan 2007 21:50:59 +0000 (13:50 -0800)
commitaa0019a5e41a57112063067f143b2b4ac032df8e
tree32510f921ce2d901c26cc8b38734b7454b07d2df
parent07fe7c0d32ff390cc9bb5bf60bdc38c45beb78c6
[PATCH] knfsd: Don't mess with the 'mode' when storing a exclusive-create cookie

NFS V3 (and V4) support exclusive create by passing a 'cookie' which can get
stored with the file.  If the file exists but has exactly the right cookie
stored, then we assume this is a retransmit and the exclusive create was
successful.

The cookie is 64bits and is traditionally stored in the mtime and atime
fields.  This causes a problem with Solaris7 as negative mtime or atime
confuse it.  So we moved two bits into the mode word instead.

But inherited ACLs sometimes overwrite the mode word on create, so this is a
problem.

So we give up and just store 62 of the 64 bits and assume that is close
enough.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfsd/vfs.c