Commit 16a789c1 authored by Linus Torvalds's avatar Linus Torvalds
parents 72a95d14 7e298750
...@@ -371,7 +371,7 @@ A partial list of the supported mount options follows: ...@@ -371,7 +371,7 @@ A partial list of the supported mount options follows:
on newly created files, directories, and devices (create, on newly created files, directories, and devices (create,
mkdir, mknod) which will result in the server setting the mkdir, mknod) which will result in the server setting the
uid and gid to the default (usually the server uid of the uid and gid to the default (usually the server uid of the
usern who mounted the share). Letting the server (rather than user who mounted the share). Letting the server (rather than
the client) set the uid and gid is the default. This the client) set the uid and gid is the default. This
parameter has no effect if the CIFS Unix Extensions are not parameter has no effect if the CIFS Unix Extensions are not
negotiated. negotiated.
...@@ -384,7 +384,7 @@ A partial list of the supported mount options follows: ...@@ -384,7 +384,7 @@ A partial list of the supported mount options follows:
client (e.g. when the application is doing large sequential client (e.g. when the application is doing large sequential
reads bigger than page size without rereading the same data) reads bigger than page size without rereading the same data)
this can provide better performance than the default this can provide better performance than the default
behavior which caches reads (reaadahead) and writes behavior which caches reads (readahead) and writes
(writebehind) through the local Linux client pagecache (writebehind) through the local Linux client pagecache
if oplock (caching token) is granted and held. Note that if oplock (caching token) is granted and held. Note that
direct allows write operations larger than page size direct allows write operations larger than page size
......
...@@ -228,7 +228,7 @@ extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, ...@@ -228,7 +228,7 @@ extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
#endif /* CONFIG_CIFS_EXPERIMENTAL */ #endif /* CONFIG_CIFS_EXPERIMENTAL */
extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen, extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen,
const struct nls_table * codepage); const struct nls_table * codepage);
extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen,
const struct nls_table * cp, int mapChars); const struct nls_table * cp, int mapChars);
......
This diff is collapsed.
...@@ -392,7 +392,8 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, struct name ...@@ -392,7 +392,8 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, struct name
rc = 0; rc = 0;
d_add(direntry, NULL); d_add(direntry, NULL);
} else { } else {
cERROR(1,("Error 0x%x or on cifs_get_inode_info in lookup",rc)); cERROR(1,("Error 0x%x on cifs_get_inode_info in lookup of %s",
rc,full_path));
/* BB special case check for Access Denied - watch security /* BB special case check for Access Denied - watch security
exposure of returning dir info implicitly via different rc exposure of returning dir info implicitly via different rc
if file exists or not but no access BB */ if file exists or not but no access BB */
......
...@@ -422,7 +422,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) ...@@ -422,7 +422,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
if (!rc) { if (!rc) {
direntry->d_inode->i_nlink--; if(direntry->d_inode)
direntry->d_inode->i_nlink--;
} else if (rc == -ENOENT) { } else if (rc == -ENOENT) {
d_drop(direntry); d_drop(direntry);
} else if (rc == -ETXTBSY) { } else if (rc == -ETXTBSY) {
...@@ -440,7 +441,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) ...@@ -440,7 +441,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
cifs_sb->mnt_cifs_flags & cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR); CIFS_MOUNT_MAP_SPECIAL_CHR);
CIFSSMBClose(xid, pTcon, netfid); CIFSSMBClose(xid, pTcon, netfid);
direntry->d_inode->i_nlink--; if(direntry->d_inode)
direntry->d_inode->i_nlink--;
} }
} else if (rc == -EACCES) { } else if (rc == -EACCES) {
/* try only if r/o attribute set in local lookup data? */ /* try only if r/o attribute set in local lookup data? */
...@@ -494,7 +496,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) ...@@ -494,7 +496,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
cifs_sb->mnt_cifs_flags & cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR); CIFS_MOUNT_MAP_SPECIAL_CHR);
if (!rc) { if (!rc) {
direntry->d_inode->i_nlink--; if(direntry->d_inode)
direntry->d_inode->i_nlink--;
} else if (rc == -ETXTBSY) { } else if (rc == -ETXTBSY) {
int oplock = FALSE; int oplock = FALSE;
__u16 netfid; __u16 netfid;
...@@ -514,17 +517,20 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) ...@@ -514,17 +517,20 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
cifs_sb->mnt_cifs_flags & cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR); CIFS_MOUNT_MAP_SPECIAL_CHR);
CIFSSMBClose(xid, pTcon, netfid); CIFSSMBClose(xid, pTcon, netfid);
direntry->d_inode->i_nlink--; if(direntry->d_inode)
direntry->d_inode->i_nlink--;
} }
/* BB if rc = -ETXTBUSY goto the rename logic BB */ /* BB if rc = -ETXTBUSY goto the rename logic BB */
} }
} }
} }
cifsInode = CIFS_I(direntry->d_inode); if(direntry->d_inode) {
cifsInode->time = 0; /* will force revalidate to get info when cifsInode = CIFS_I(direntry->d_inode);
needed */ cifsInode->time = 0; /* will force revalidate to get info
direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = when needed */
current_fs_time(inode->i_sb); direntry->d_inode->i_ctime = current_fs_time(inode->i_sb);
}
inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
cifsInode = CIFS_I(inode); cifsInode = CIFS_I(inode);
cifsInode->time = 0; /* force revalidate of dir as well */ cifsInode->time = 0; /* force revalidate of dir as well */
......
...@@ -571,6 +571,7 @@ cifs_convertUCSpath(char *target, const __le16 * source, int maxlen, ...@@ -571,6 +571,7 @@ cifs_convertUCSpath(char *target, const __le16 * source, int maxlen,
break; break;
case UNI_LESSTHAN: case UNI_LESSTHAN:
target[j] = '<'; target[j] = '<';
break;
default: default:
len = cp->uni2char(src_char, &target[j], len = cp->uni2char(src_char, &target[j],
NLS_MAX_CHARSET_SIZE); NLS_MAX_CHARSET_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment