Loading fs/cifs/CHANGES +3 −0 Original line number Original line Diff line number Diff line Version 1.53 ------------ Version 1.52 Version 1.52 ------------ ------------ Fix oops on second mount to server when null auth is used. Fix oops on second mount to server when null auth is used. Loading fs/cifs/cifsfs.c +33 −33 Original line number Original line Diff line number Diff line Loading @@ -222,50 +222,50 @@ static int cifs_statfs(struct dentry *dentry, struct kstatfs *buf) cifs_statfs(struct dentry *dentry, struct kstatfs *buf) { { struct super_block *sb = dentry->d_sb; struct super_block *sb = dentry->d_sb; int xid; struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifsTconInfo *tcon = cifs_sb->tcon; int rc = -EOPNOTSUPP; int rc = -EOPNOTSUPP; struct cifs_sb_info *cifs_sb; int xid; struct cifsTconInfo *pTcon; xid = GetXid(); xid = GetXid(); cifs_sb = CIFS_SB(sb); pTcon = cifs_sb->tcon; buf->f_type = CIFS_MAGIC_NUMBER; buf->f_type = CIFS_MAGIC_NUMBER; /* instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO */ /* buf->f_namelen = PATH_MAX; /* PATH_MAX may be too long - it would * PATH_MAX may be too long - it would presumably be total path, presumably be total path, but note * but note that some servers (includinng Samba 3) have a shorter that some servers (includinng Samba 3) * maximum path. have a shorter maximum path */ * * Instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO. */ buf->f_namelen = PATH_MAX; buf->f_files = 0; /* undefined */ buf->f_files = 0; /* undefined */ buf->f_ffree = 0; /* unlimited */ buf->f_ffree = 0; /* unlimited */ /* BB we could add a second check for a QFS Unix capability bit */ /* /* BB FIXME check CIFS_POSIX_EXTENSIONS Unix cap first FIXME BB */ * We could add a second check for a QFS Unix capability bit if ((pTcon->ses->capabilities & CAP_UNIX) && (CIFS_POSIX_EXTENSIONS & */ le64_to_cpu(pTcon->fsUnixInfo.Capability))) if ((tcon->ses->capabilities & CAP_UNIX) && rc = CIFSSMBQFSPosixInfo(xid, pTcon, buf); (CIFS_POSIX_EXTENSIONS & le64_to_cpu(tcon->fsUnixInfo.Capability))) rc = CIFSSMBQFSPosixInfo(xid, tcon, buf); /* Only need to call the old QFSInfo if failed /* on newer one */ * Only need to call the old QFSInfo if failed on newer one, if (rc) * e.g. by OS/2. if (pTcon->ses->capabilities & CAP_NT_SMBS) **/ rc = CIFSSMBQFSInfo(xid, pTcon, buf); /* not supported by OS2 */ if (rc && (tcon->ses->capabilities & CAP_NT_SMBS)) rc = CIFSSMBQFSInfo(xid, tcon, buf); /* Some old Windows servers also do not support level 103, retry with /* older level one if old server failed the previous call or we * Some old Windows servers also do not support level 103, retry with bypassed it because we detected that this was an older LANMAN sess */ * older level one if old server failed the previous call or we * bypassed it because we detected that this was an older LANMAN sess */ if (rc) if (rc) rc = SMBOldQFSInfo(xid, pTcon, buf); rc = SMBOldQFSInfo(xid, tcon, buf); /* int f_type; __fsid_t f_fsid; int f_namelen; */ /* BB get from info in tcon struct at mount time call to QFSAttrInfo */ FreeXid(xid); FreeXid(xid); return 0; /* always return success? what if volume is no return 0; longer available? */ } } static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd) static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd) Loading Loading
fs/cifs/CHANGES +3 −0 Original line number Original line Diff line number Diff line Version 1.53 ------------ Version 1.52 Version 1.52 ------------ ------------ Fix oops on second mount to server when null auth is used. Fix oops on second mount to server when null auth is used. Loading
fs/cifs/cifsfs.c +33 −33 Original line number Original line Diff line number Diff line Loading @@ -222,50 +222,50 @@ static int cifs_statfs(struct dentry *dentry, struct kstatfs *buf) cifs_statfs(struct dentry *dentry, struct kstatfs *buf) { { struct super_block *sb = dentry->d_sb; struct super_block *sb = dentry->d_sb; int xid; struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifsTconInfo *tcon = cifs_sb->tcon; int rc = -EOPNOTSUPP; int rc = -EOPNOTSUPP; struct cifs_sb_info *cifs_sb; int xid; struct cifsTconInfo *pTcon; xid = GetXid(); xid = GetXid(); cifs_sb = CIFS_SB(sb); pTcon = cifs_sb->tcon; buf->f_type = CIFS_MAGIC_NUMBER; buf->f_type = CIFS_MAGIC_NUMBER; /* instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO */ /* buf->f_namelen = PATH_MAX; /* PATH_MAX may be too long - it would * PATH_MAX may be too long - it would presumably be total path, presumably be total path, but note * but note that some servers (includinng Samba 3) have a shorter that some servers (includinng Samba 3) * maximum path. have a shorter maximum path */ * * Instead could get the real value via SMB_QUERY_FS_ATTRIBUTE_INFO. */ buf->f_namelen = PATH_MAX; buf->f_files = 0; /* undefined */ buf->f_files = 0; /* undefined */ buf->f_ffree = 0; /* unlimited */ buf->f_ffree = 0; /* unlimited */ /* BB we could add a second check for a QFS Unix capability bit */ /* /* BB FIXME check CIFS_POSIX_EXTENSIONS Unix cap first FIXME BB */ * We could add a second check for a QFS Unix capability bit if ((pTcon->ses->capabilities & CAP_UNIX) && (CIFS_POSIX_EXTENSIONS & */ le64_to_cpu(pTcon->fsUnixInfo.Capability))) if ((tcon->ses->capabilities & CAP_UNIX) && rc = CIFSSMBQFSPosixInfo(xid, pTcon, buf); (CIFS_POSIX_EXTENSIONS & le64_to_cpu(tcon->fsUnixInfo.Capability))) rc = CIFSSMBQFSPosixInfo(xid, tcon, buf); /* Only need to call the old QFSInfo if failed /* on newer one */ * Only need to call the old QFSInfo if failed on newer one, if (rc) * e.g. by OS/2. if (pTcon->ses->capabilities & CAP_NT_SMBS) **/ rc = CIFSSMBQFSInfo(xid, pTcon, buf); /* not supported by OS2 */ if (rc && (tcon->ses->capabilities & CAP_NT_SMBS)) rc = CIFSSMBQFSInfo(xid, tcon, buf); /* Some old Windows servers also do not support level 103, retry with /* older level one if old server failed the previous call or we * Some old Windows servers also do not support level 103, retry with bypassed it because we detected that this was an older LANMAN sess */ * older level one if old server failed the previous call or we * bypassed it because we detected that this was an older LANMAN sess */ if (rc) if (rc) rc = SMBOldQFSInfo(xid, pTcon, buf); rc = SMBOldQFSInfo(xid, tcon, buf); /* int f_type; __fsid_t f_fsid; int f_namelen; */ /* BB get from info in tcon struct at mount time call to QFSAttrInfo */ FreeXid(xid); FreeXid(xid); return 0; /* always return success? what if volume is no return 0; longer available? */ } } static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd) static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd) Loading