]> git.openpandora.org Git - pandora-kernel.git/commitdiff
[CIFS] work around bug in Samba server handling for posix open
authorSteve French <sfrench@us.ibm.com>
Wed, 4 Mar 2009 19:54:08 +0000 (19:54 +0000)
committerSteve French <sfrench@us.ibm.com>
Thu, 12 Mar 2009 01:36:21 +0000 (01:36 +0000)
Samba server (version 3.3.1 and earlier, and 3.2.8 and earlier) incorrectly
required the O_CREAT flag on posix open (even when a file was not being
created).  This disables posix open (create is still ok) after the first
attempt returns EINVAL (and logs an error, once, recommending that they
update their server).

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/CHANGES
fs/cifs/cifsglob.h
fs/cifs/file.c

index b33c8412e2c821ba8ad47ed4c4b37f59b0d325d6..fc977dfe95932b5130b900fb26f1f2170c8ab8c5 100644 (file)
@@ -11,6 +11,8 @@ to better ensure that we wait for server to write all of the data to
 server disk (not just write it over the network).  Add new mount
 parameter to allow user to disable sending the (slow) SMB flush on
 fsync if desired (fsync still flushes all cached write data to the server).
+Posix file open support added (turned off after one attempt if server
+fails to support it properly, as with Samba server versions prior to 3.3.2)
 
 Version 1.56
 ------------
index 44ff94d37e18f6c21e3c9fd0e8e6217e25085592..9fbf4dff5da6100b5a5ad902ec0384e1e18cac02 100644 (file)
@@ -299,6 +299,7 @@ struct cifsTconInfo {
        bool unix_ext:1;  /* if false disable Linux extensions to CIFS protocol
                                for this mount even if server would support */
        bool local_lease:1; /* check leases (only) on local system not remote */
+       bool broken_posix_open; /* e.g. Samba server versions < 3.3.2, 3.2.9 */
        bool need_reconnect:1; /* connection reset, tid now invalid */
        /* BB add field for back pointer to sb struct(s)? */
 };
diff --cc fs/cifs/file.c
Simple merge