aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-02-13 23:42:51 -0500
committerSteve French <sfrench@us.ibm.com>2007-02-13 23:42:51 -0500
commit8af18971584d1e05770560206cfdfd1d6ba8a17f (patch)
tree5720ee5fa4de18eebc64d41b761e2f890d99b35e /fs/cifs/cifssmb.c
parent7ba526316ae122e60c0c7a40793491f71b9ec590 (diff)
[CIFS] on reconnect to Samba - reset the unix capabilities
After temporary server or network failure and reconneciton, we were not resending the unix capabilities via SetFSInfo - which confused Samba posix byte range locking code. Discovered by jra Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 472e33e0f3cf..b8e91470c27f 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -158,9 +158,15 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
158 nls_codepage); 158 nls_codepage);
159 if(!rc && (tcon->tidStatus == CifsNeedReconnect)) { 159 if(!rc && (tcon->tidStatus == CifsNeedReconnect)) {
160 mark_open_files_invalid(tcon); 160 mark_open_files_invalid(tcon);
161 rc = CIFSTCon(0, tcon->ses, tcon->treeName, tcon 161 rc = CIFSTCon(0, tcon->ses, tcon->treeName,
162 , nls_codepage); 162 tcon, nls_codepage);
163 up(&tcon->ses->sesSem); 163 up(&tcon->ses->sesSem);
164 /* tell server which Unix caps we support */
165 if (tcon->ses->capabilities & CAP_UNIX)
166 reset_cifs_unix_caps(0 /* no xid */,
167 tcon,
168 NULL /* we do not know sb */,
169 NULL /* no vol info */);
164 /* BB FIXME add code to check if wsize needs 170 /* BB FIXME add code to check if wsize needs
165 update due to negotiated smb buffer size 171 update due to negotiated smb buffer size
166 shrinking */ 172 shrinking */
@@ -298,6 +304,12 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
298 rc = CIFSTCon(0, tcon->ses, tcon->treeName, 304 rc = CIFSTCon(0, tcon->ses, tcon->treeName,
299 tcon, nls_codepage); 305 tcon, nls_codepage);
300 up(&tcon->ses->sesSem); 306 up(&tcon->ses->sesSem);
307 /* tell server which Unix caps we support */
308 if (tcon->ses->capabilities & CAP_UNIX)
309 reset_cifs_unix_caps(0 /* no xid */,
310 tcon,
311 NULL /* do not know sb */,
312 NULL /* no vol info */);
301 /* BB FIXME add code to check if wsize needs 313 /* BB FIXME add code to check if wsize needs
302 update due to negotiated smb buffer size 314 update due to negotiated smb buffer size
303 shrinking */ 315 shrinking */