Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

+49 -41
+2 -2
fs/cifs/README
··· 371 on newly created files, directories, and devices (create, 372 mkdir, mknod) which will result in the server setting the 373 uid and gid to the default (usually the server uid of the 374 - usern who mounted the share). Letting the server (rather than 375 the client) set the uid and gid is the default. This 376 parameter has no effect if the CIFS Unix Extensions are not 377 negotiated. ··· 384 client (e.g. when the application is doing large sequential 385 reads bigger than page size without rereading the same data) 386 this can provide better performance than the default 387 - behavior which caches reads (reaadahead) and writes 388 (writebehind) through the local Linux client pagecache 389 if oplock (caching token) is granted and held. Note that 390 direct allows write operations larger than page size
··· 371 on newly created files, directories, and devices (create, 372 mkdir, mknod) which will result in the server setting the 373 uid and gid to the default (usually the server uid of the 374 + user who mounted the share). Letting the server (rather than 375 the client) set the uid and gid is the default. This 376 parameter has no effect if the CIFS Unix Extensions are not 377 negotiated. ··· 384 client (e.g. when the application is doing large sequential 385 reads bigger than page size without rereading the same data) 386 this can provide better performance than the default 387 + behavior which caches reads (readahead) and writes 388 (writebehind) through the local Linux client pagecache 389 if oplock (caching token) is granted and held. Note that 390 direct allows write operations larger than page size
+1 -1
fs/cifs/cifsproto.h
··· 228 const struct nls_table *nls_codepage, 229 int remap_special_chars); 230 #endif /* CONFIG_CIFS_EXPERIMENTAL */ 231 - extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen, 232 const struct nls_table * codepage); 233 extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, 234 const struct nls_table * cp, int mapChars);
··· 228 const struct nls_table *nls_codepage, 229 int remap_special_chars); 230 #endif /* CONFIG_CIFS_EXPERIMENTAL */ 231 + extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, 232 const struct nls_table * codepage); 233 extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, 234 const struct nls_table * cp, int mapChars);
+28 -28
fs/cifs/cifssmb.c
··· 567 568 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 569 name_len = 570 - cifsConvertToUCS((__u16 *) pSMB->fileName, fileName, 571 PATH_MAX, nls_codepage, remap); 572 name_len++; /* trailing null */ 573 name_len *= 2; ··· 665 return rc; 666 667 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 668 - name_len = cifsConvertToUCS((__u16 *) pSMB->DirName, name, 669 PATH_MAX, nls_codepage, remap); 670 name_len++; /* trailing null */ 671 name_len *= 2; ··· 719 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 720 count = 1; /* account for one byte pad to word boundary */ 721 name_len = 722 - cifsConvertToUCS((__u16 *) (pSMB->fileName + 1), 723 fileName, PATH_MAX, nls_codepage, remap); 724 name_len++; /* trailing null */ 725 name_len *= 2; ··· 1141 1142 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1143 name_len = 1144 - cifsConvertToUCS((__u16 *) pSMB->OldFileName, fromName, 1145 PATH_MAX, nls_codepage, remap); 1146 name_len++; /* trailing null */ 1147 name_len *= 2; ··· 1149 /* protocol requires ASCII signature byte on Unicode string */ 1150 pSMB->OldFileName[name_len + 1] = 0x00; 1151 name_len2 = 1152 - cifsConvertToUCS((__u16 *) &pSMB->OldFileName[name_len + 2], 1153 toName, PATH_MAX, nls_codepage, remap); 1154 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; 1155 name_len2 *= 2; /* convert to bytes */ ··· 1236 /* unicode only call */ 1237 if(target_name == NULL) { 1238 sprintf(dummy_string,"cifs%x",pSMB->hdr.Mid); 1239 - len_of_str = cifsConvertToUCS((__u16 *)rename_info->target_name, 1240 dummy_string, 24, nls_codepage, remap); 1241 } else { 1242 - len_of_str = cifsConvertToUCS((__u16 *)rename_info->target_name, 1243 target_name, PATH_MAX, nls_codepage, remap); 1244 } 1245 rename_info->target_name_len = cpu_to_le32(2 * len_of_str); ··· 1296 pSMB->Flags = cpu_to_le16(flags & COPY_TREE); 1297 1298 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1299 - name_len = cifsConvertToUCS((__u16 *) pSMB->OldFileName, 1300 fromName, PATH_MAX, nls_codepage, 1301 remap); 1302 name_len++; /* trailing null */ ··· 1304 pSMB->OldFileName[name_len] = 0x04; /* pad */ 1305 /* protocol requires ASCII signature byte on Unicode string */ 1306 pSMB->OldFileName[name_len + 1] = 0x00; 1307 - name_len2 = cifsConvertToUCS((__u16 *)&pSMB->OldFileName[name_len + 2], 1308 toName, PATH_MAX, nls_codepage, remap); 1309 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; 1310 name_len2 *= 2; /* convert to bytes */ ··· 1453 return rc; 1454 1455 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1456 - name_len = cifsConvertToUCS((__u16 *) pSMB->FileName, toName, 1457 PATH_MAX, nls_codepage, remap); 1458 name_len++; /* trailing null */ 1459 name_len *= 2; ··· 1476 data_offset = (char *) (&pSMB->hdr.Protocol) + offset; 1477 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1478 name_len_target = 1479 - cifsConvertToUCS((__u16 *) data_offset, fromName, PATH_MAX, 1480 nls_codepage, remap); 1481 name_len_target++; /* trailing null */ 1482 name_len_target *= 2; ··· 1546 1547 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1548 name_len = 1549 - cifsConvertToUCS((__u16 *) pSMB->OldFileName, fromName, 1550 PATH_MAX, nls_codepage, remap); 1551 name_len++; /* trailing null */ 1552 name_len *= 2; 1553 pSMB->OldFileName[name_len] = 0; /* pad */ 1554 pSMB->OldFileName[name_len + 1] = 0x04; 1555 name_len2 = 1556 - cifsConvertToUCS((__u16 *)&pSMB->OldFileName[name_len + 2], 1557 toName, PATH_MAX, nls_codepage, remap); 1558 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; 1559 name_len2 *= 2; /* convert to bytes */ ··· 1939 1940 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1941 name_len = 1942 - cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, 1943 PATH_MAX, nls_codepage, remap); 1944 name_len++; /* trailing null */ 1945 name_len *= 2; ··· 2024 return rc; 2025 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2026 name_len = 2027 - cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, 2028 PATH_MAX, nls_codepage, remap); 2029 name_len++; /* trailing null */ 2030 name_len *= 2; ··· 2188 2189 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2190 name_len = 2191 - cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, 2192 PATH_MAX, nls_codepage, remap); 2193 name_len++; /* trailing null */ 2194 name_len *= 2; ··· 2269 2270 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2271 name_len = 2272 - cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, 2273 PATH_MAX, nls_codepage, remap); 2274 name_len++; /* trailing null */ 2275 name_len *= 2; ··· 2350 2351 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2352 name_len = 2353 - cifsConvertToUCS((wchar_t *) pSMB->FileName, searchName, PATH_MAX 2354 /* find define for this maxpathcomponent */ 2355 , nls_codepage); 2356 name_len++; /* trailing null */ ··· 2435 2436 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2437 name_len = 2438 - cifsConvertToUCS((__u16 *) pSMB->FileName,searchName, 2439 PATH_MAX, nls_codepage, remap); 2440 /* We can not add the asterik earlier in case 2441 it got remapped to 0xF03A as if it were part of the ··· 2726 2727 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2728 name_len = 2729 - cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, 2730 PATH_MAX,nls_codepage, remap); 2731 name_len++; /* trailing null */ 2732 name_len *= 2; ··· 2837 if (ses->capabilities & CAP_UNICODE) { 2838 pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; 2839 name_len = 2840 - cifsConvertToUCS((__u16 *) pSMB->RequestFileName, 2841 searchName, PATH_MAX, nls_codepage, remap); 2842 name_len++; /* trailing null */ 2843 name_len *= 2; ··· 3369 3370 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3371 name_len = 3372 - cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, 3373 PATH_MAX, nls_codepage, remap); 3374 name_len++; /* trailing null */ 3375 name_len *= 2; ··· 3627 3628 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3629 name_len = 3630 - cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, 3631 PATH_MAX, nls_codepage, remap); 3632 name_len++; /* trailing null */ 3633 name_len *= 2; ··· 3708 3709 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3710 name_len = 3711 - ConvertToUCS((wchar_t *) pSMB->fileName, fileName, 3712 PATH_MAX, nls_codepage); 3713 name_len++; /* trailing null */ 3714 name_len *= 2; ··· 3759 3760 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3761 name_len = 3762 - cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, 3763 PATH_MAX, nls_codepage, remap); 3764 name_len++; /* trailing null */ 3765 name_len *= 2; ··· 3904 3905 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3906 name_len = 3907 - cifsConvertToUCS((wchar_t *) pSMB->FileName, searchName, 3908 PATH_MAX, nls_codepage, remap); 3909 name_len++; /* trailing null */ 3910 name_len *= 2; ··· 4047 4048 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 4049 name_len = 4050 - cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, 4051 PATH_MAX, nls_codepage, remap); 4052 name_len++; /* trailing null */ 4053 name_len *= 2; ··· 4194 4195 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 4196 name_len = 4197 - cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, 4198 PATH_MAX, nls_codepage, remap); 4199 name_len++; /* trailing null */ 4200 name_len *= 2;
··· 567 568 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 569 name_len = 570 + cifsConvertToUCS((__le16 *) pSMB->fileName, fileName, 571 PATH_MAX, nls_codepage, remap); 572 name_len++; /* trailing null */ 573 name_len *= 2; ··· 665 return rc; 666 667 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 668 + name_len = cifsConvertToUCS((__le16 *) pSMB->DirName, name, 669 PATH_MAX, nls_codepage, remap); 670 name_len++; /* trailing null */ 671 name_len *= 2; ··· 719 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 720 count = 1; /* account for one byte pad to word boundary */ 721 name_len = 722 + cifsConvertToUCS((__le16 *) (pSMB->fileName + 1), 723 fileName, PATH_MAX, nls_codepage, remap); 724 name_len++; /* trailing null */ 725 name_len *= 2; ··· 1141 1142 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1143 name_len = 1144 + cifsConvertToUCS((__le16 *) pSMB->OldFileName, fromName, 1145 PATH_MAX, nls_codepage, remap); 1146 name_len++; /* trailing null */ 1147 name_len *= 2; ··· 1149 /* protocol requires ASCII signature byte on Unicode string */ 1150 pSMB->OldFileName[name_len + 1] = 0x00; 1151 name_len2 = 1152 + cifsConvertToUCS((__le16 *) &pSMB->OldFileName[name_len + 2], 1153 toName, PATH_MAX, nls_codepage, remap); 1154 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; 1155 name_len2 *= 2; /* convert to bytes */ ··· 1236 /* unicode only call */ 1237 if(target_name == NULL) { 1238 sprintf(dummy_string,"cifs%x",pSMB->hdr.Mid); 1239 + len_of_str = cifsConvertToUCS((__le16 *)rename_info->target_name, 1240 dummy_string, 24, nls_codepage, remap); 1241 } else { 1242 + len_of_str = cifsConvertToUCS((__le16 *)rename_info->target_name, 1243 target_name, PATH_MAX, nls_codepage, remap); 1244 } 1245 rename_info->target_name_len = cpu_to_le32(2 * len_of_str); ··· 1296 pSMB->Flags = cpu_to_le16(flags & COPY_TREE); 1297 1298 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1299 + name_len = cifsConvertToUCS((__le16 *) pSMB->OldFileName, 1300 fromName, PATH_MAX, nls_codepage, 1301 remap); 1302 name_len++; /* trailing null */ ··· 1304 pSMB->OldFileName[name_len] = 0x04; /* pad */ 1305 /* protocol requires ASCII signature byte on Unicode string */ 1306 pSMB->OldFileName[name_len + 1] = 0x00; 1307 + name_len2 = cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], 1308 toName, PATH_MAX, nls_codepage, remap); 1309 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; 1310 name_len2 *= 2; /* convert to bytes */ ··· 1453 return rc; 1454 1455 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1456 + name_len = cifsConvertToUCS((__le16 *) pSMB->FileName, toName, 1457 PATH_MAX, nls_codepage, remap); 1458 name_len++; /* trailing null */ 1459 name_len *= 2; ··· 1476 data_offset = (char *) (&pSMB->hdr.Protocol) + offset; 1477 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1478 name_len_target = 1479 + cifsConvertToUCS((__le16 *) data_offset, fromName, PATH_MAX, 1480 nls_codepage, remap); 1481 name_len_target++; /* trailing null */ 1482 name_len_target *= 2; ··· 1546 1547 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1548 name_len = 1549 + cifsConvertToUCS((__le16 *) pSMB->OldFileName, fromName, 1550 PATH_MAX, nls_codepage, remap); 1551 name_len++; /* trailing null */ 1552 name_len *= 2; 1553 pSMB->OldFileName[name_len] = 0; /* pad */ 1554 pSMB->OldFileName[name_len + 1] = 0x04; 1555 name_len2 = 1556 + cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], 1557 toName, PATH_MAX, nls_codepage, remap); 1558 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; 1559 name_len2 *= 2; /* convert to bytes */ ··· 1939 1940 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 1941 name_len = 1942 + cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, 1943 PATH_MAX, nls_codepage, remap); 1944 name_len++; /* trailing null */ 1945 name_len *= 2; ··· 2024 return rc; 2025 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2026 name_len = 2027 + cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, 2028 PATH_MAX, nls_codepage, remap); 2029 name_len++; /* trailing null */ 2030 name_len *= 2; ··· 2188 2189 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2190 name_len = 2191 + cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, 2192 PATH_MAX, nls_codepage, remap); 2193 name_len++; /* trailing null */ 2194 name_len *= 2; ··· 2269 2270 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2271 name_len = 2272 + cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, 2273 PATH_MAX, nls_codepage, remap); 2274 name_len++; /* trailing null */ 2275 name_len *= 2; ··· 2350 2351 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2352 name_len = 2353 + cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, PATH_MAX 2354 /* find define for this maxpathcomponent */ 2355 , nls_codepage); 2356 name_len++; /* trailing null */ ··· 2435 2436 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2437 name_len = 2438 + cifsConvertToUCS((__le16 *) pSMB->FileName,searchName, 2439 PATH_MAX, nls_codepage, remap); 2440 /* We can not add the asterik earlier in case 2441 it got remapped to 0xF03A as if it were part of the ··· 2726 2727 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 2728 name_len = 2729 + cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, 2730 PATH_MAX,nls_codepage, remap); 2731 name_len++; /* trailing null */ 2732 name_len *= 2; ··· 2837 if (ses->capabilities & CAP_UNICODE) { 2838 pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; 2839 name_len = 2840 + cifsConvertToUCS((__le16 *) pSMB->RequestFileName, 2841 searchName, PATH_MAX, nls_codepage, remap); 2842 name_len++; /* trailing null */ 2843 name_len *= 2; ··· 3369 3370 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3371 name_len = 3372 + cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, 3373 PATH_MAX, nls_codepage, remap); 3374 name_len++; /* trailing null */ 3375 name_len *= 2; ··· 3627 3628 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3629 name_len = 3630 + cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, 3631 PATH_MAX, nls_codepage, remap); 3632 name_len++; /* trailing null */ 3633 name_len *= 2; ··· 3708 3709 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3710 name_len = 3711 + ConvertToUCS((__le16 *) pSMB->fileName, fileName, 3712 PATH_MAX, nls_codepage); 3713 name_len++; /* trailing null */ 3714 name_len *= 2; ··· 3759 3760 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3761 name_len = 3762 + cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, 3763 PATH_MAX, nls_codepage, remap); 3764 name_len++; /* trailing null */ 3765 name_len *= 2; ··· 3904 3905 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 3906 name_len = 3907 + cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, 3908 PATH_MAX, nls_codepage, remap); 3909 name_len++; /* trailing null */ 3910 name_len *= 2; ··· 4047 4048 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 4049 name_len = 4050 + cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, 4051 PATH_MAX, nls_codepage, remap); 4052 name_len++; /* trailing null */ 4053 name_len *= 2; ··· 4194 4195 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 4196 name_len = 4197 + cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, 4198 PATH_MAX, nls_codepage, remap); 4199 name_len++; /* trailing null */ 4200 name_len *= 2;
+2 -1
fs/cifs/dir.c
··· 392 rc = 0; 393 d_add(direntry, NULL); 394 } else { 395 - cERROR(1,("Error 0x%x or on cifs_get_inode_info in lookup",rc)); 396 /* BB special case check for Access Denied - watch security 397 exposure of returning dir info implicitly via different rc 398 if file exists or not but no access BB */
··· 392 rc = 0; 393 d_add(direntry, NULL); 394 } else { 395 + cERROR(1,("Error 0x%x on cifs_get_inode_info in lookup of %s", 396 + rc,full_path)); 397 /* BB special case check for Access Denied - watch security 398 exposure of returning dir info implicitly via different rc 399 if file exists or not but no access BB */
+15 -9
fs/cifs/inode.c
··· 422 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 423 424 if (!rc) { 425 - direntry->d_inode->i_nlink--; 426 } else if (rc == -ENOENT) { 427 d_drop(direntry); 428 } else if (rc == -ETXTBSY) { ··· 441 cifs_sb->mnt_cifs_flags & 442 CIFS_MOUNT_MAP_SPECIAL_CHR); 443 CIFSSMBClose(xid, pTcon, netfid); 444 - direntry->d_inode->i_nlink--; 445 } 446 } else if (rc == -EACCES) { 447 /* try only if r/o attribute set in local lookup data? */ ··· 496 cifs_sb->mnt_cifs_flags & 497 CIFS_MOUNT_MAP_SPECIAL_CHR); 498 if (!rc) { 499 - direntry->d_inode->i_nlink--; 500 } else if (rc == -ETXTBSY) { 501 int oplock = FALSE; 502 __u16 netfid; ··· 517 cifs_sb->mnt_cifs_flags & 518 CIFS_MOUNT_MAP_SPECIAL_CHR); 519 CIFSSMBClose(xid, pTcon, netfid); 520 - direntry->d_inode->i_nlink--; 521 } 522 /* BB if rc = -ETXTBUSY goto the rename logic BB */ 523 } 524 } 525 } 526 - cifsInode = CIFS_I(direntry->d_inode); 527 - cifsInode->time = 0; /* will force revalidate to get info when 528 - needed */ 529 - direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = 530 - current_fs_time(inode->i_sb); 531 cifsInode = CIFS_I(inode); 532 cifsInode->time = 0; /* force revalidate of dir as well */ 533
··· 422 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 423 424 if (!rc) { 425 + if(direntry->d_inode) 426 + direntry->d_inode->i_nlink--; 427 } else if (rc == -ENOENT) { 428 d_drop(direntry); 429 } else if (rc == -ETXTBSY) { ··· 440 cifs_sb->mnt_cifs_flags & 441 CIFS_MOUNT_MAP_SPECIAL_CHR); 442 CIFSSMBClose(xid, pTcon, netfid); 443 + if(direntry->d_inode) 444 + direntry->d_inode->i_nlink--; 445 } 446 } else if (rc == -EACCES) { 447 /* try only if r/o attribute set in local lookup data? */ ··· 494 cifs_sb->mnt_cifs_flags & 495 CIFS_MOUNT_MAP_SPECIAL_CHR); 496 if (!rc) { 497 + if(direntry->d_inode) 498 + direntry->d_inode->i_nlink--; 499 } else if (rc == -ETXTBSY) { 500 int oplock = FALSE; 501 __u16 netfid; ··· 514 cifs_sb->mnt_cifs_flags & 515 CIFS_MOUNT_MAP_SPECIAL_CHR); 516 CIFSSMBClose(xid, pTcon, netfid); 517 + if(direntry->d_inode) 518 + direntry->d_inode->i_nlink--; 519 } 520 /* BB if rc = -ETXTBUSY goto the rename logic BB */ 521 } 522 } 523 } 524 + if(direntry->d_inode) { 525 + cifsInode = CIFS_I(direntry->d_inode); 526 + cifsInode->time = 0; /* will force revalidate to get info 527 + when needed */ 528 + direntry->d_inode->i_ctime = current_fs_time(inode->i_sb); 529 + } 530 + inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); 531 cifsInode = CIFS_I(inode); 532 cifsInode->time = 0; /* force revalidate of dir as well */ 533
+1
fs/cifs/misc.c
··· 571 break; 572 case UNI_LESSTHAN: 573 target[j] = '<'; 574 default: 575 len = cp->uni2char(src_char, &target[j], 576 NLS_MAX_CHARSET_SIZE);
··· 571 break; 572 case UNI_LESSTHAN: 573 target[j] = '<'; 574 + break; 575 default: 576 len = cp->uni2char(src_char, &target[j], 577 NLS_MAX_CHARSET_SIZE);