diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/README | 4 | ||||
-rw-r--r-- | fs/cifs/cifsproto.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 56 | ||||
-rw-r--r-- | fs/cifs/dir.c | 3 | ||||
-rw-r--r-- | fs/cifs/inode.c | 24 | ||||
-rw-r--r-- | fs/cifs/misc.c | 1 | ||||
-rw-r--r-- | fs/jbd/checkpoint.c | 5 | ||||
-rw-r--r-- | fs/mpage.c | 5 | ||||
-rw-r--r-- | fs/proc/proc_devtree.c | 105 |
9 files changed, 94 insertions, 111 deletions
diff --git a/fs/cifs/README b/fs/cifs/README index e74df0c732..34b0cf7111 100644 --- a/fs/cifs/README +++ b/fs/cifs/README | |||
@@ -371,7 +371,7 @@ A partial list of the supported mount options follows: | |||
371 | on newly created files, directories, and devices (create, | 371 | on newly created files, directories, and devices (create, |
372 | mkdir, mknod) which will result in the server setting the | 372 | mkdir, mknod) which will result in the server setting the |
373 | uid and gid to the default (usually the server uid of 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 | 374 | user who mounted the share). Letting the server (rather than |
375 | the client) set the uid and gid is the default. This | 375 | the client) set the uid and gid is the default. This |
376 | parameter has no effect if the CIFS Unix Extensions are not | 376 | parameter has no effect if the CIFS Unix Extensions are not |
377 | negotiated. | 377 | negotiated. |
@@ -384,7 +384,7 @@ A partial list of the supported mount options follows: | |||
384 | client (e.g. when the application is doing large sequential | 384 | client (e.g. when the application is doing large sequential |
385 | reads bigger than page size without rereading the same data) | 385 | reads bigger than page size without rereading the same data) |
386 | this can provide better performance than the default | 386 | this can provide better performance than the default |
387 | behavior which caches reads (reaadahead) and writes | 387 | behavior which caches reads (readahead) and writes |
388 | (writebehind) through the local Linux client pagecache | 388 | (writebehind) through the local Linux client pagecache |
389 | if oplock (caching token) is granted and held. Note that | 389 | if oplock (caching token) is granted and held. Note that |
390 | direct allows write operations larger than page size | 390 | direct allows write operations larger than page size |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 0010511083..ea239dea57 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -228,7 +228,7 @@ extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, | |||
228 | const struct nls_table *nls_codepage, | 228 | const struct nls_table *nls_codepage, |
229 | int remap_special_chars); | 229 | int remap_special_chars); |
230 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 230 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
231 | extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen, | 231 | extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, |
232 | const struct nls_table * codepage); | 232 | const struct nls_table * codepage); |
233 | extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, | 233 | extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, |
234 | const struct nls_table * cp, int mapChars); | 234 | const struct nls_table * cp, int mapChars); |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 741ff0c69f..3c628bf667 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -567,7 +567,7 @@ DelFileRetry: | |||
567 | 567 | ||
568 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 568 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
569 | name_len = | 569 | name_len = |
570 | cifsConvertToUCS((__u16 *) pSMB->fileName, fileName, | 570 | cifsConvertToUCS((__le16 *) pSMB->fileName, fileName, |
571 | PATH_MAX, nls_codepage, remap); | 571 | PATH_MAX, nls_codepage, remap); |
572 | name_len++; /* trailing null */ | 572 | name_len++; /* trailing null */ |
573 | name_len *= 2; | 573 | name_len *= 2; |
@@ -665,7 +665,7 @@ MkDirRetry: | |||
665 | return rc; | 665 | return rc; |
666 | 666 | ||
667 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 667 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
668 | name_len = cifsConvertToUCS((__u16 *) pSMB->DirName, name, | 668 | name_len = cifsConvertToUCS((__le16 *) pSMB->DirName, name, |
669 | PATH_MAX, nls_codepage, remap); | 669 | PATH_MAX, nls_codepage, remap); |
670 | name_len++; /* trailing null */ | 670 | name_len++; /* trailing null */ |
671 | name_len *= 2; | 671 | name_len *= 2; |
@@ -719,7 +719,7 @@ openRetry: | |||
719 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 719 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
720 | count = 1; /* account for one byte pad to word boundary */ | 720 | count = 1; /* account for one byte pad to word boundary */ |
721 | name_len = | 721 | name_len = |
722 | cifsConvertToUCS((__u16 *) (pSMB->fileName + 1), | 722 | cifsConvertToUCS((__le16 *) (pSMB->fileName + 1), |
723 | fileName, PATH_MAX, nls_codepage, remap); | 723 | fileName, PATH_MAX, nls_codepage, remap); |
724 | name_len++; /* trailing null */ | 724 | name_len++; /* trailing null */ |
725 | name_len *= 2; | 725 | name_len *= 2; |
@@ -1141,7 +1141,7 @@ renameRetry: | |||
1141 | 1141 | ||
1142 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 1142 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
1143 | name_len = | 1143 | name_len = |
1144 | cifsConvertToUCS((__u16 *) pSMB->OldFileName, fromName, | 1144 | cifsConvertToUCS((__le16 *) pSMB->OldFileName, fromName, |
1145 | PATH_MAX, nls_codepage, remap); | 1145 | PATH_MAX, nls_codepage, remap); |
1146 | name_len++; /* trailing null */ | 1146 | name_len++; /* trailing null */ |
1147 | name_len *= 2; | 1147 | name_len *= 2; |
@@ -1149,7 +1149,7 @@ renameRetry: | |||
1149 | /* protocol requires ASCII signature byte on Unicode string */ | 1149 | /* protocol requires ASCII signature byte on Unicode string */ |
1150 | pSMB->OldFileName[name_len + 1] = 0x00; | 1150 | pSMB->OldFileName[name_len + 1] = 0x00; |
1151 | name_len2 = | 1151 | name_len2 = |
1152 | cifsConvertToUCS((__u16 *) &pSMB->OldFileName[name_len + 2], | 1152 | cifsConvertToUCS((__le16 *) &pSMB->OldFileName[name_len + 2], |
1153 | toName, PATH_MAX, nls_codepage, remap); | 1153 | toName, PATH_MAX, nls_codepage, remap); |
1154 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; | 1154 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; |
1155 | name_len2 *= 2; /* convert to bytes */ | 1155 | name_len2 *= 2; /* convert to bytes */ |
@@ -1236,10 +1236,10 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon, | |||
1236 | /* unicode only call */ | 1236 | /* unicode only call */ |
1237 | if(target_name == NULL) { | 1237 | if(target_name == NULL) { |
1238 | sprintf(dummy_string,"cifs%x",pSMB->hdr.Mid); | 1238 | sprintf(dummy_string,"cifs%x",pSMB->hdr.Mid); |
1239 | len_of_str = cifsConvertToUCS((__u16 *)rename_info->target_name, | 1239 | len_of_str = cifsConvertToUCS((__le16 *)rename_info->target_name, |
1240 | dummy_string, 24, nls_codepage, remap); | 1240 | dummy_string, 24, nls_codepage, remap); |
1241 | } else { | 1241 | } else { |
1242 | len_of_str = cifsConvertToUCS((__u16 *)rename_info->target_name, | 1242 | len_of_str = cifsConvertToUCS((__le16 *)rename_info->target_name, |
1243 | target_name, PATH_MAX, nls_codepage, remap); | 1243 | target_name, PATH_MAX, nls_codepage, remap); |
1244 | } | 1244 | } |
1245 | rename_info->target_name_len = cpu_to_le32(2 * len_of_str); | 1245 | rename_info->target_name_len = cpu_to_le32(2 * len_of_str); |
@@ -1296,7 +1296,7 @@ copyRetry: | |||
1296 | pSMB->Flags = cpu_to_le16(flags & COPY_TREE); | 1296 | pSMB->Flags = cpu_to_le16(flags & COPY_TREE); |
1297 | 1297 | ||
1298 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 1298 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
1299 | name_len = cifsConvertToUCS((__u16 *) pSMB->OldFileName, | 1299 | name_len = cifsConvertToUCS((__le16 *) pSMB->OldFileName, |
1300 | fromName, PATH_MAX, nls_codepage, | 1300 | fromName, PATH_MAX, nls_codepage, |
1301 | remap); | 1301 | remap); |
1302 | name_len++; /* trailing null */ | 1302 | name_len++; /* trailing null */ |
@@ -1304,7 +1304,7 @@ copyRetry: | |||
1304 | pSMB->OldFileName[name_len] = 0x04; /* pad */ | 1304 | pSMB->OldFileName[name_len] = 0x04; /* pad */ |
1305 | /* protocol requires ASCII signature byte on Unicode string */ | 1305 | /* protocol requires ASCII signature byte on Unicode string */ |
1306 | pSMB->OldFileName[name_len + 1] = 0x00; | 1306 | pSMB->OldFileName[name_len + 1] = 0x00; |
1307 | name_len2 = cifsConvertToUCS((__u16 *)&pSMB->OldFileName[name_len + 2], | 1307 | name_len2 = cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], |
1308 | toName, PATH_MAX, nls_codepage, remap); | 1308 | toName, PATH_MAX, nls_codepage, remap); |
1309 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; | 1309 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; |
1310 | name_len2 *= 2; /* convert to bytes */ | 1310 | name_len2 *= 2; /* convert to bytes */ |
@@ -1453,7 +1453,7 @@ createHardLinkRetry: | |||
1453 | return rc; | 1453 | return rc; |
1454 | 1454 | ||
1455 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 1455 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
1456 | name_len = cifsConvertToUCS((__u16 *) pSMB->FileName, toName, | 1456 | name_len = cifsConvertToUCS((__le16 *) pSMB->FileName, toName, |
1457 | PATH_MAX, nls_codepage, remap); | 1457 | PATH_MAX, nls_codepage, remap); |
1458 | name_len++; /* trailing null */ | 1458 | name_len++; /* trailing null */ |
1459 | name_len *= 2; | 1459 | name_len *= 2; |
@@ -1476,7 +1476,7 @@ createHardLinkRetry: | |||
1476 | data_offset = (char *) (&pSMB->hdr.Protocol) + offset; | 1476 | data_offset = (char *) (&pSMB->hdr.Protocol) + offset; |
1477 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 1477 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
1478 | name_len_target = | 1478 | name_len_target = |
1479 | cifsConvertToUCS((__u16 *) data_offset, fromName, PATH_MAX, | 1479 | cifsConvertToUCS((__le16 *) data_offset, fromName, PATH_MAX, |
1480 | nls_codepage, remap); | 1480 | nls_codepage, remap); |
1481 | name_len_target++; /* trailing null */ | 1481 | name_len_target++; /* trailing null */ |
1482 | name_len_target *= 2; | 1482 | name_len_target *= 2; |
@@ -1546,14 +1546,14 @@ winCreateHardLinkRetry: | |||
1546 | 1546 | ||
1547 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 1547 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
1548 | name_len = | 1548 | name_len = |
1549 | cifsConvertToUCS((__u16 *) pSMB->OldFileName, fromName, | 1549 | cifsConvertToUCS((__le16 *) pSMB->OldFileName, fromName, |
1550 | PATH_MAX, nls_codepage, remap); | 1550 | PATH_MAX, nls_codepage, remap); |
1551 | name_len++; /* trailing null */ | 1551 | name_len++; /* trailing null */ |
1552 | name_len *= 2; | 1552 | name_len *= 2; |
1553 | pSMB->OldFileName[name_len] = 0; /* pad */ | 1553 | pSMB->OldFileName[name_len] = 0; /* pad */ |
1554 | pSMB->OldFileName[name_len + 1] = 0x04; | 1554 | pSMB->OldFileName[name_len + 1] = 0x04; |
1555 | name_len2 = | 1555 | name_len2 = |
1556 | cifsConvertToUCS((__u16 *)&pSMB->OldFileName[name_len + 2], | 1556 | cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], |
1557 | toName, PATH_MAX, nls_codepage, remap); | 1557 | toName, PATH_MAX, nls_codepage, remap); |
1558 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; | 1558 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; |
1559 | name_len2 *= 2; /* convert to bytes */ | 1559 | name_len2 *= 2; /* convert to bytes */ |
@@ -1939,7 +1939,7 @@ queryAclRetry: | |||
1939 | 1939 | ||
1940 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 1940 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
1941 | name_len = | 1941 | name_len = |
1942 | cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, | 1942 | cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, |
1943 | PATH_MAX, nls_codepage, remap); | 1943 | PATH_MAX, nls_codepage, remap); |
1944 | name_len++; /* trailing null */ | 1944 | name_len++; /* trailing null */ |
1945 | name_len *= 2; | 1945 | name_len *= 2; |
@@ -2024,7 +2024,7 @@ setAclRetry: | |||
2024 | return rc; | 2024 | return rc; |
2025 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 2025 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
2026 | name_len = | 2026 | name_len = |
2027 | cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, | 2027 | cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, |
2028 | PATH_MAX, nls_codepage, remap); | 2028 | PATH_MAX, nls_codepage, remap); |
2029 | name_len++; /* trailing null */ | 2029 | name_len++; /* trailing null */ |
2030 | name_len *= 2; | 2030 | name_len *= 2; |
@@ -2188,7 +2188,7 @@ QPathInfoRetry: | |||
2188 | 2188 | ||
2189 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 2189 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
2190 | name_len = | 2190 | name_len = |
2191 | cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, | 2191 | cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, |
2192 | PATH_MAX, nls_codepage, remap); | 2192 | PATH_MAX, nls_codepage, remap); |
2193 | name_len++; /* trailing null */ | 2193 | name_len++; /* trailing null */ |
2194 | name_len *= 2; | 2194 | name_len *= 2; |
@@ -2269,7 +2269,7 @@ UnixQPathInfoRetry: | |||
2269 | 2269 | ||
2270 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 2270 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
2271 | name_len = | 2271 | name_len = |
2272 | cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, | 2272 | cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, |
2273 | PATH_MAX, nls_codepage, remap); | 2273 | PATH_MAX, nls_codepage, remap); |
2274 | name_len++; /* trailing null */ | 2274 | name_len++; /* trailing null */ |
2275 | name_len *= 2; | 2275 | name_len *= 2; |
@@ -2350,7 +2350,7 @@ findUniqueRetry: | |||
2350 | 2350 | ||
2351 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 2351 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
2352 | name_len = | 2352 | name_len = |
2353 | cifsConvertToUCS((wchar_t *) pSMB->FileName, searchName, PATH_MAX | 2353 | cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, PATH_MAX |
2354 | /* find define for this maxpathcomponent */ | 2354 | /* find define for this maxpathcomponent */ |
2355 | , nls_codepage); | 2355 | , nls_codepage); |
2356 | name_len++; /* trailing null */ | 2356 | name_len++; /* trailing null */ |
@@ -2435,7 +2435,7 @@ findFirstRetry: | |||
2435 | 2435 | ||
2436 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 2436 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
2437 | name_len = | 2437 | name_len = |
2438 | cifsConvertToUCS((__u16 *) pSMB->FileName,searchName, | 2438 | cifsConvertToUCS((__le16 *) pSMB->FileName,searchName, |
2439 | PATH_MAX, nls_codepage, remap); | 2439 | PATH_MAX, nls_codepage, remap); |
2440 | /* We can not add the asterik earlier in case | 2440 | /* We can not add the asterik earlier in case |
2441 | it got remapped to 0xF03A as if it were part of the | 2441 | it got remapped to 0xF03A as if it were part of the |
@@ -2726,7 +2726,7 @@ GetInodeNumberRetry: | |||
2726 | 2726 | ||
2727 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 2727 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
2728 | name_len = | 2728 | name_len = |
2729 | cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, | 2729 | cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, |
2730 | PATH_MAX,nls_codepage, remap); | 2730 | PATH_MAX,nls_codepage, remap); |
2731 | name_len++; /* trailing null */ | 2731 | name_len++; /* trailing null */ |
2732 | name_len *= 2; | 2732 | name_len *= 2; |
@@ -2837,7 +2837,7 @@ getDFSRetry: | |||
2837 | if (ses->capabilities & CAP_UNICODE) { | 2837 | if (ses->capabilities & CAP_UNICODE) { |
2838 | pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; | 2838 | pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; |
2839 | name_len = | 2839 | name_len = |
2840 | cifsConvertToUCS((__u16 *) pSMB->RequestFileName, | 2840 | cifsConvertToUCS((__le16 *) pSMB->RequestFileName, |
2841 | searchName, PATH_MAX, nls_codepage, remap); | 2841 | searchName, PATH_MAX, nls_codepage, remap); |
2842 | name_len++; /* trailing null */ | 2842 | name_len++; /* trailing null */ |
2843 | name_len *= 2; | 2843 | name_len *= 2; |
@@ -3369,7 +3369,7 @@ SetEOFRetry: | |||
3369 | 3369 | ||
3370 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 3370 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
3371 | name_len = | 3371 | name_len = |
3372 | cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, | 3372 | cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, |
3373 | PATH_MAX, nls_codepage, remap); | 3373 | PATH_MAX, nls_codepage, remap); |
3374 | name_len++; /* trailing null */ | 3374 | name_len++; /* trailing null */ |
3375 | name_len *= 2; | 3375 | name_len *= 2; |
@@ -3627,7 +3627,7 @@ SetTimesRetry: | |||
3627 | 3627 | ||
3628 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 3628 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
3629 | name_len = | 3629 | name_len = |
3630 | cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, | 3630 | cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, |
3631 | PATH_MAX, nls_codepage, remap); | 3631 | PATH_MAX, nls_codepage, remap); |
3632 | name_len++; /* trailing null */ | 3632 | name_len++; /* trailing null */ |
3633 | name_len *= 2; | 3633 | name_len *= 2; |
@@ -3708,7 +3708,7 @@ SetAttrLgcyRetry: | |||
3708 | 3708 | ||
3709 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 3709 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
3710 | name_len = | 3710 | name_len = |
3711 | ConvertToUCS((wchar_t *) pSMB->fileName, fileName, | 3711 | ConvertToUCS((__le16 *) pSMB->fileName, fileName, |
3712 | PATH_MAX, nls_codepage); | 3712 | PATH_MAX, nls_codepage); |
3713 | name_len++; /* trailing null */ | 3713 | name_len++; /* trailing null */ |
3714 | name_len *= 2; | 3714 | name_len *= 2; |
@@ -3759,7 +3759,7 @@ setPermsRetry: | |||
3759 | 3759 | ||
3760 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 3760 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
3761 | name_len = | 3761 | name_len = |
3762 | cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, | 3762 | cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, |
3763 | PATH_MAX, nls_codepage, remap); | 3763 | PATH_MAX, nls_codepage, remap); |
3764 | name_len++; /* trailing null */ | 3764 | name_len++; /* trailing null */ |
3765 | name_len *= 2; | 3765 | name_len *= 2; |
@@ -3904,7 +3904,7 @@ QAllEAsRetry: | |||
3904 | 3904 | ||
3905 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 3905 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
3906 | name_len = | 3906 | name_len = |
3907 | cifsConvertToUCS((wchar_t *) pSMB->FileName, searchName, | 3907 | cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, |
3908 | PATH_MAX, nls_codepage, remap); | 3908 | PATH_MAX, nls_codepage, remap); |
3909 | name_len++; /* trailing null */ | 3909 | name_len++; /* trailing null */ |
3910 | name_len *= 2; | 3910 | name_len *= 2; |
@@ -4047,7 +4047,7 @@ QEARetry: | |||
4047 | 4047 | ||
4048 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 4048 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
4049 | name_len = | 4049 | name_len = |
4050 | cifsConvertToUCS((__u16 *) pSMB->FileName, searchName, | 4050 | cifsConvertToUCS((__le16 *) pSMB->FileName, searchName, |
4051 | PATH_MAX, nls_codepage, remap); | 4051 | PATH_MAX, nls_codepage, remap); |
4052 | name_len++; /* trailing null */ | 4052 | name_len++; /* trailing null */ |
4053 | name_len *= 2; | 4053 | name_len *= 2; |
@@ -4194,7 +4194,7 @@ SetEARetry: | |||
4194 | 4194 | ||
4195 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { | 4195 | if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { |
4196 | name_len = | 4196 | name_len = |
4197 | cifsConvertToUCS((__u16 *) pSMB->FileName, fileName, | 4197 | cifsConvertToUCS((__le16 *) pSMB->FileName, fileName, |
4198 | PATH_MAX, nls_codepage, remap); | 4198 | PATH_MAX, nls_codepage, remap); |
4199 | name_len++; /* trailing null */ | 4199 | name_len++; /* trailing null */ |
4200 | name_len *= 2; | 4200 | name_len *= 2; |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index e3137aa48c..3f3538d4a1 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -392,7 +392,8 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, struct name | |||
392 | rc = 0; | 392 | rc = 0; |
393 | d_add(direntry, NULL); | 393 | d_add(direntry, NULL); |
394 | } else { | 394 | } else { |
395 | cERROR(1,("Error 0x%x or on cifs_get_inode_info in lookup",rc)); | 395 | cERROR(1,("Error 0x%x on cifs_get_inode_info in lookup of %s", |
396 | rc,full_path)); | ||
396 | /* BB special case check for Access Denied - watch security | 397 | /* BB special case check for Access Denied - watch security |
397 | exposure of returning dir info implicitly via different rc | 398 | exposure of returning dir info implicitly via different rc |
398 | if file exists or not but no access BB */ | 399 | if file exists or not but no access BB */ |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 6709472882..b8b78cbb34 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -422,7 +422,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
422 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 422 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
423 | 423 | ||
424 | if (!rc) { | 424 | if (!rc) { |
425 | direntry->d_inode->i_nlink--; | 425 | if(direntry->d_inode) |
426 | direntry->d_inode->i_nlink--; | ||
426 | } else if (rc == -ENOENT) { | 427 | } else if (rc == -ENOENT) { |
427 | d_drop(direntry); | 428 | d_drop(direntry); |
428 | } else if (rc == -ETXTBSY) { | 429 | } else if (rc == -ETXTBSY) { |
@@ -440,7 +441,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
440 | cifs_sb->mnt_cifs_flags & | 441 | cifs_sb->mnt_cifs_flags & |
441 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 442 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
442 | CIFSSMBClose(xid, pTcon, netfid); | 443 | CIFSSMBClose(xid, pTcon, netfid); |
443 | direntry->d_inode->i_nlink--; | 444 | if(direntry->d_inode) |
445 | direntry->d_inode->i_nlink--; | ||
444 | } | 446 | } |
445 | } else if (rc == -EACCES) { | 447 | } else if (rc == -EACCES) { |
446 | /* try only if r/o attribute set in local lookup data? */ | 448 | /* 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 | cifs_sb->mnt_cifs_flags & | 496 | cifs_sb->mnt_cifs_flags & |
495 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 497 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
496 | if (!rc) { | 498 | if (!rc) { |
497 | direntry->d_inode->i_nlink--; | 499 | if(direntry->d_inode) |
500 | direntry->d_inode->i_nlink--; | ||
498 | } else if (rc == -ETXTBSY) { | 501 | } else if (rc == -ETXTBSY) { |
499 | int oplock = FALSE; | 502 | int oplock = FALSE; |
500 | __u16 netfid; | 503 | __u16 netfid; |
@@ -514,17 +517,20 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
514 | cifs_sb->mnt_cifs_flags & | 517 | cifs_sb->mnt_cifs_flags & |
515 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 518 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
516 | CIFSSMBClose(xid, pTcon, netfid); | 519 | CIFSSMBClose(xid, pTcon, netfid); |
517 | direntry->d_inode->i_nlink--; | 520 | if(direntry->d_inode) |
521 | direntry->d_inode->i_nlink--; | ||
518 | } | 522 | } |
519 | /* BB if rc = -ETXTBUSY goto the rename logic BB */ | 523 | /* BB if rc = -ETXTBUSY goto the rename logic BB */ |
520 | } | 524 | } |
521 | } | 525 | } |
522 | } | 526 | } |
523 | cifsInode = CIFS_I(direntry->d_inode); | 527 | if(direntry->d_inode) { |
524 | cifsInode->time = 0; /* will force revalidate to get info when | 528 | cifsInode = CIFS_I(direntry->d_inode); |
525 | needed */ | 529 | cifsInode->time = 0; /* will force revalidate to get info |
526 | direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = | 530 | when needed */ |
527 | current_fs_time(inode->i_sb); | 531 | direntry->d_inode->i_ctime = current_fs_time(inode->i_sb); |
532 | } | ||
533 | inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); | ||
528 | cifsInode = CIFS_I(inode); | 534 | cifsInode = CIFS_I(inode); |
529 | cifsInode->time = 0; /* force revalidate of dir as well */ | 535 | cifsInode->time = 0; /* force revalidate of dir as well */ |
530 | 536 | ||
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index db14b503d8..072b4ee8c5 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -571,6 +571,7 @@ cifs_convertUCSpath(char *target, const __le16 * source, int maxlen, | |||
571 | break; | 571 | break; |
572 | case UNI_LESSTHAN: | 572 | case UNI_LESSTHAN: |
573 | target[j] = '<'; | 573 | target[j] = '<'; |
574 | break; | ||
574 | default: | 575 | default: |
575 | len = cp->uni2char(src_char, &target[j], | 576 | len = cp->uni2char(src_char, &target[j], |
576 | NLS_MAX_CHARSET_SIZE); | 577 | NLS_MAX_CHARSET_SIZE); |
diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c index 98d830401c..5a97e346bd 100644 --- a/fs/jbd/checkpoint.c +++ b/fs/jbd/checkpoint.c | |||
@@ -188,7 +188,6 @@ static int __cleanup_transaction(journal_t *journal, transaction_t *transaction) | |||
188 | } else { | 188 | } else { |
189 | jbd_unlock_bh_state(bh); | 189 | jbd_unlock_bh_state(bh); |
190 | } | 190 | } |
191 | jh = next_jh; | ||
192 | } while (jh != last_jh); | 191 | } while (jh != last_jh); |
193 | 192 | ||
194 | return ret; | 193 | return ret; |
@@ -339,8 +338,10 @@ int log_do_checkpoint(journal_t *journal) | |||
339 | } | 338 | } |
340 | } while (jh != last_jh && !retry); | 339 | } while (jh != last_jh && !retry); |
341 | 340 | ||
342 | if (batch_count) | 341 | if (batch_count) { |
343 | __flush_batch(journal, bhs, &batch_count); | 342 | __flush_batch(journal, bhs, &batch_count); |
343 | retry = 1; | ||
344 | } | ||
344 | 345 | ||
345 | /* | 346 | /* |
346 | * If someone cleaned up this transaction while we slept, we're | 347 | * If someone cleaned up this transaction while we slept, we're |
diff --git a/fs/mpage.c b/fs/mpage.c index b92c0e64ae..bb9aebe938 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -79,8 +79,11 @@ static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err) | |||
79 | if (--bvec >= bio->bi_io_vec) | 79 | if (--bvec >= bio->bi_io_vec) |
80 | prefetchw(&bvec->bv_page->flags); | 80 | prefetchw(&bvec->bv_page->flags); |
81 | 81 | ||
82 | if (!uptodate) | 82 | if (!uptodate){ |
83 | SetPageError(page); | 83 | SetPageError(page); |
84 | if (page->mapping) | ||
85 | set_bit(AS_EIO, &page->mapping->flags); | ||
86 | } | ||
84 | end_page_writeback(page); | 87 | end_page_writeback(page); |
85 | } while (bvec >= bio->bi_io_vec); | 88 | } while (bvec >= bio->bi_io_vec); |
86 | bio_put(bio); | 89 | bio_put(bio); |
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index 67423c696c..6fd57f1541 100644 --- a/fs/proc/proc_devtree.c +++ b/fs/proc/proc_devtree.c | |||
@@ -12,15 +12,8 @@ | |||
12 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
13 | 13 | ||
14 | #ifndef HAVE_ARCH_DEVTREE_FIXUPS | 14 | #ifndef HAVE_ARCH_DEVTREE_FIXUPS |
15 | static inline void set_node_proc_entry(struct device_node *np, struct proc_dir_entry *de) | 15 | static inline void set_node_proc_entry(struct device_node *np, |
16 | { | 16 | struct proc_dir_entry *de) |
17 | } | ||
18 | |||
19 | static void inline set_node_name_link(struct device_node *np, struct proc_dir_entry *de) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | static void inline set_node_addr_link(struct device_node *np, struct proc_dir_entry *de) | ||
24 | { | 17 | { |
25 | } | 18 | } |
26 | #endif | 19 | #endif |
@@ -58,89 +51,67 @@ static int property_read_proc(char *page, char **start, off_t off, | |||
58 | /* | 51 | /* |
59 | * Process a node, adding entries for its children and its properties. | 52 | * Process a node, adding entries for its children and its properties. |
60 | */ | 53 | */ |
61 | void proc_device_tree_add_node(struct device_node *np, struct proc_dir_entry *de) | 54 | void proc_device_tree_add_node(struct device_node *np, |
55 | struct proc_dir_entry *de) | ||
62 | { | 56 | { |
63 | struct property *pp; | 57 | struct property *pp; |
64 | struct proc_dir_entry *ent; | 58 | struct proc_dir_entry *ent; |
65 | struct device_node *child, *sib; | 59 | struct device_node *child; |
66 | const char *p, *at; | 60 | struct proc_dir_entry *list = NULL, **lastp; |
67 | int l; | 61 | const char *p; |
68 | struct proc_dir_entry *list, **lastp, *al; | ||
69 | 62 | ||
70 | set_node_proc_entry(np, de); | 63 | set_node_proc_entry(np, de); |
71 | lastp = &list; | 64 | lastp = &list; |
72 | for (pp = np->properties; pp != 0; pp = pp->next) { | 65 | for (child = NULL; (child = of_get_next_child(np, child));) { |
73 | /* | ||
74 | * Unfortunately proc_register puts each new entry | ||
75 | * at the beginning of the list. So we rearrange them. | ||
76 | */ | ||
77 | ent = create_proc_read_entry(pp->name, strncmp(pp->name, "security-", 9) ? | ||
78 | S_IRUGO : S_IRUSR, de, property_read_proc, pp); | ||
79 | if (ent == 0) | ||
80 | break; | ||
81 | if (!strncmp(pp->name, "security-", 9)) | ||
82 | ent->size = 0; /* don't leak number of password chars */ | ||
83 | else | ||
84 | ent->size = pp->length; | ||
85 | *lastp = ent; | ||
86 | lastp = &ent->next; | ||
87 | } | ||
88 | child = NULL; | ||
89 | while ((child = of_get_next_child(np, child))) { | ||
90 | p = strrchr(child->full_name, '/'); | 66 | p = strrchr(child->full_name, '/'); |
91 | if (!p) | 67 | if (!p) |
92 | p = child->full_name; | 68 | p = child->full_name; |
93 | else | 69 | else |
94 | ++p; | 70 | ++p; |
95 | /* chop off '@0' if the name ends with that */ | ||
96 | l = strlen(p); | ||
97 | if (l > 2 && p[l-2] == '@' && p[l-1] == '0') | ||
98 | l -= 2; | ||
99 | ent = proc_mkdir(p, de); | 71 | ent = proc_mkdir(p, de); |
100 | if (ent == 0) | 72 | if (ent == 0) |
101 | break; | 73 | break; |
102 | *lastp = ent; | 74 | *lastp = ent; |
75 | ent->next = NULL; | ||
103 | lastp = &ent->next; | 76 | lastp = &ent->next; |
104 | proc_device_tree_add_node(child, ent); | 77 | proc_device_tree_add_node(child, ent); |
105 | 78 | } | |
106 | /* | 79 | of_node_put(child); |
107 | * If we left the address part on the name, consider | 80 | for (pp = np->properties; pp != 0; pp = pp->next) { |
108 | * adding symlinks from the name and address parts. | ||
109 | */ | ||
110 | if (p[l] != 0 || (at = strchr(p, '@')) == 0) | ||
111 | continue; | ||
112 | |||
113 | /* | 81 | /* |
114 | * If this is the first node with a given name property, | 82 | * Yet another Apple device-tree bogosity: on some machines, |
115 | * add a symlink with the name property as its name. | 83 | * they have properties & nodes with the same name. Those |
84 | * properties are quite unimportant for us though, thus we | ||
85 | * simply "skip" them here, but we do have to check. | ||
116 | */ | 86 | */ |
117 | sib = NULL; | 87 | for (ent = list; ent != NULL; ent = ent->next) |
118 | while ((sib = of_get_next_child(np, sib)) && sib != child) | 88 | if (!strcmp(ent->name, pp->name)) |
119 | if (sib->name && strcmp(sib->name, child->name) == 0) | ||
120 | break; | ||
121 | if (sib == child && strncmp(p, child->name, l) != 0) { | ||
122 | al = proc_symlink(child->name, de, ent->name); | ||
123 | if (al == 0) { | ||
124 | of_node_put(sib); | ||
125 | break; | 89 | break; |
126 | } | 90 | if (ent != NULL) { |
127 | set_node_name_link(child, al); | 91 | printk(KERN_WARNING "device-tree: property \"%s\" name" |
128 | *lastp = al; | 92 | " conflicts with node in %s\n", pp->name, |
129 | lastp = &al->next; | 93 | np->full_name); |
94 | continue; | ||
130 | } | 95 | } |
131 | of_node_put(sib); | 96 | |
132 | /* | 97 | /* |
133 | * Add another directory with the @address part as its name. | 98 | * Unfortunately proc_register puts each new entry |
99 | * at the beginning of the list. So we rearrange them. | ||
134 | */ | 100 | */ |
135 | al = proc_symlink(at, de, ent->name); | 101 | ent = create_proc_read_entry(pp->name, |
136 | if (al == 0) | 102 | strncmp(pp->name, "security-", 9) |
103 | ? S_IRUGO : S_IRUSR, de, | ||
104 | property_read_proc, pp); | ||
105 | if (ent == 0) | ||
137 | break; | 106 | break; |
138 | set_node_addr_link(child, al); | 107 | if (!strncmp(pp->name, "security-", 9)) |
139 | *lastp = al; | 108 | ent->size = 0; /* don't leak number of password chars */ |
140 | lastp = &al->next; | 109 | else |
110 | ent->size = pp->length; | ||
111 | ent->next = NULL; | ||
112 | *lastp = ent; | ||
113 | lastp = &ent->next; | ||
141 | } | 114 | } |
142 | of_node_put(child); | ||
143 | *lastp = NULL; | ||
144 | de->subdir = list; | 115 | de->subdir = list; |
145 | } | 116 | } |
146 | 117 | ||