aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-04-28 00:04:34 -0400
committerSteve French <sfrench@us.ibm.com>2008-04-28 00:04:34 -0400
commit39da9847113a870b20fee9a7c216a848b9a5e9f7 (patch)
tree992ea8af4d3eb108f7d36496ab22a9b90faad07d /fs/cifs
parent1dbbb6077426f8ce63d6a59c5ac6613e1689cbde (diff)
[CIFS] Fix statfs formatting
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/CHANGES3
-rw-r--r--fs/cifs/cifsfs.c66
2 files changed, 36 insertions, 33 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 05c9da6181c3..8355e918fddf 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,3 +1,6 @@
1Version 1.53
2------------
3
1Version 1.52 4Version 1.52
2------------ 5------------
3Fix oops on second mount to server when null auth is used. 6Fix oops on second mount to server when null auth is used.
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 39c2cbdface7..68f1cdf6aed7 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -222,50 +222,50 @@ static int
222cifs_statfs(struct dentry *dentry, struct kstatfs *buf) 222cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
223{ 223{
224 struct super_block *sb = dentry->d_sb; 224 struct super_block *sb = dentry->d_sb;
225 int xid; 225 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
226 struct cifsTconInfo *tcon = cifs_sb->tcon;
226 int rc = -EOPNOTSUPP; 227 int rc = -EOPNOTSUPP;
227 struct cifs_sb_info *cifs_sb; 228 int xid;
228 struct cifsTconInfo *pTcon;
229 229
230 xid = GetXid(); 230 xid = GetXid();
231 231
232 cifs_sb = CIFS_SB(sb);
233 pTcon = cifs_sb->tcon;
234
235 buf->f_type = CIFS_MAGIC_NUMBER; 232 buf->f_type = CIFS_MAGIC_NUMBER;
236 233
237 /* instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO */ 234 /*
238 buf->f_namelen = PATH_MAX; /* PATH_MAX may be too long - it would 235 * PATH_MAX may be too long - it would presumably be total path,
239 presumably be total path, but note 236 * but note that some servers (includinng Samba 3) have a shorter
240 that some servers (includinng Samba 3) 237 * maximum path.
241 have a shorter maximum path */ 238 *
239 * Instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO.
240 */
241 buf->f_namelen = PATH_MAX;
242 buf->f_files = 0; /* undefined */ 242 buf->f_files = 0; /* undefined */
243 buf->f_ffree = 0; /* unlimited */ 243 buf->f_ffree = 0; /* unlimited */
244 244
245/* BB we could add a second check for a QFS Unix capability bit */ 245 /*
246/* BB FIXME check CIFS_POSIX_EXTENSIONS Unix cap first FIXME BB */ 246 * We could add a second check for a QFS Unix capability bit
247 if ((pTcon->ses->capabilities & CAP_UNIX) && (CIFS_POSIX_EXTENSIONS & 247 */
248 le64_to_cpu(pTcon->fsUnixInfo.Capability))) 248 if ((tcon->ses->capabilities & CAP_UNIX) &&
249 rc = CIFSSMBQFSPosixInfo(xid, pTcon, buf); 249 (CIFS_POSIX_EXTENSIONS & le64_to_cpu(tcon->fsUnixInfo.Capability)))
250 250 rc = CIFSSMBQFSPosixInfo(xid, tcon, buf);
251 /* Only need to call the old QFSInfo if failed 251
252 on newer one */ 252 /*
253 if (rc) 253 * Only need to call the old QFSInfo if failed on newer one,
254 if (pTcon->ses->capabilities & CAP_NT_SMBS) 254 * e.g. by OS/2.
255 rc = CIFSSMBQFSInfo(xid, pTcon, buf); /* not supported by OS2 */ 255 **/
256 256 if (rc && (tcon->ses->capabilities & CAP_NT_SMBS))
257 /* Some old Windows servers also do not support level 103, retry with 257 rc = CIFSSMBQFSInfo(xid, tcon, buf);
258 older level one if old server failed the previous call or we 258
259 bypassed it because we detected that this was an older LANMAN sess */ 259 /*
260 * Some old Windows servers also do not support level 103, retry with
261 * older level one if old server failed the previous call or we
262 * bypassed it because we detected that this was an older LANMAN sess
263 */
260 if (rc) 264 if (rc)
261 rc = SMBOldQFSInfo(xid, pTcon, buf); 265 rc = SMBOldQFSInfo(xid, tcon, buf);
262 /* int f_type; 266
263 __fsid_t f_fsid;
264 int f_namelen; */
265 /* BB get from info in tcon struct at mount time call to QFSAttrInfo */
266 FreeXid(xid); 267 FreeXid(xid);
267 return 0; /* always return success? what if volume is no 268 return 0;
268 longer available? */
269} 269}
270 270
271static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd) 271static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd)