aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/link.c
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-29 01:41:06 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-29 01:41:06 -0400
commit737b758c965a9b223ac1243ab38d9e507ac86c64 (patch)
tree9dcdaf3b573a2a27d0d43c1477a18867b144e5f4 /fs/cifs/link.c
parent6c91d362f1e1ebbd4513adb68fc79d552c11e2c0 (diff)
[PATCH] cifs: character mapping of special characters (part 3 of 3)
Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r--fs/cifs/link.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 1455810ba1cb..bde0fabfece0 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -59,10 +59,14 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
59 59
60 if (cifs_sb_target->tcon->ses->capabilities & CAP_UNIX) 60 if (cifs_sb_target->tcon->ses->capabilities & CAP_UNIX)
61 rc = CIFSUnixCreateHardLink(xid, pTcon, fromName, toName, 61 rc = CIFSUnixCreateHardLink(xid, pTcon, fromName, toName,
62 cifs_sb_target->local_nls); 62 cifs_sb_target->local_nls,
63 cifs_sb_target->mnt_cifs_flags &
64 CIFS_MOUNT_MAP_SPECIAL_CHR);
63 else { 65 else {
64 rc = CIFSCreateHardLink(xid, pTcon, fromName, toName, 66 rc = CIFSCreateHardLink(xid, pTcon, fromName, toName,
65 cifs_sb_target->local_nls); 67 cifs_sb_target->local_nls,
68 cifs_sb_target->mnt_cifs_flags &
69 CIFS_MOUNT_MAP_SPECIAL_CHR);
66 if(rc == -EIO) 70 if(rc == -EIO)
67 rc = -EOPNOTSUPP; 71 rc = -EOPNOTSUPP;
68 } 72 }
@@ -260,7 +264,10 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
260 cifs_sb->local_nls); 264 cifs_sb->local_nls);
261 else { 265 else {
262 rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, GENERIC_READ, 266 rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, GENERIC_READ,
263 OPEN_REPARSE_POINT,&fid, &oplock, NULL, cifs_sb->local_nls); 267 OPEN_REPARSE_POINT,&fid, &oplock, NULL,
268 cifs_sb->local_nls,
269 cifs_sb->mnt_cifs_flags &
270 CIFS_MOUNT_MAP_SPECIAL_CHR);
264 if(!rc) { 271 if(!rc) {
265 rc = CIFSSMBQueryReparseLinkInfo(xid, pTcon, full_path, 272 rc = CIFSSMBQueryReparseLinkInfo(xid, pTcon, full_path,
266 tmpbuffer, 273 tmpbuffer,
@@ -279,7 +286,10 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
279 strncpy(tmp_path, pTcon->treeName, MAX_TREE_SIZE); 286 strncpy(tmp_path, pTcon->treeName, MAX_TREE_SIZE);
280 strncat(tmp_path, full_path, MAX_PATHCONF); 287 strncat(tmp_path, full_path, MAX_PATHCONF);
281 rc = get_dfs_path(xid, pTcon->ses, tmp_path, 288 rc = get_dfs_path(xid, pTcon->ses, tmp_path,
282 cifs_sb->local_nls, &num_referrals, &referrals); 289 cifs_sb->local_nls,
290 &num_referrals, &referrals,
291 cifs_sb->mnt_cifs_flags &
292 CIFS_MOUNT_MAP_SPECIAL_CHR);
283 cFYI(1,("Get DFS for %s rc = %d ",tmp_path, rc)); 293 cFYI(1,("Get DFS for %s rc = %d ",tmp_path, rc));
284 if((num_referrals == 0) && (rc == 0)) 294 if((num_referrals == 0) && (rc == 0))
285 rc = -EACCES; 295 rc = -EACCES;