aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/README4
-rw-r--r--fs/cifs/cifsproto.h2
-rw-r--r--fs/cifs/cifssmb.c56
-rw-r--r--fs/cifs/dir.c3
-rw-r--r--fs/cifs/inode.c24
-rw-r--r--fs/cifs/misc.c1
-rw-r--r--fs/hostfs/hostfs_kern.c1
-rw-r--r--fs/namei.c1
-rw-r--r--fs/proc/proc_devtree.c105
-rw-r--r--fs/reiserfs/stree.c1
-rw-r--r--fs/reiserfs/super.c4
-rw-r--r--fs/udf/udftime.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c1
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c7
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c29
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.h6
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c3
-rw-r--r--fs/xfs/xfs_iomap.c4
18 files changed, 123 insertions, 131 deletions
diff --git a/fs/cifs/README b/fs/cifs/README
index e74df0c73256..34b0cf7111f3 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 0010511083fc..ea239dea571e 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 */
231extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen, 231extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen,
232 const struct nls_table * codepage); 232 const struct nls_table * codepage);
233extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, 233extern 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 741ff0c69f37..3c628bf667a5 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 e3137aa48cdd..3f3538d4a1fa 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 670947288262..b8b78cbb34c9 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 db14b503d89e..072b4ee8c53e 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/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 14a0d339d036..4bf43ea87c46 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -23,7 +23,6 @@
23#include "kern_util.h" 23#include "kern_util.h"
24#include "kern.h" 24#include "kern.h"
25#include "user_util.h" 25#include "user_util.h"
26#include "2_5compat.h"
27#include "init.h" 26#include "init.h"
28 27
29struct hostfs_inode_info { 28struct hostfs_inode_info {
diff --git a/fs/namei.c b/fs/namei.c
index defe6781e003..dd78f01b6de8 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1580,6 +1580,7 @@ enoent:
1580fail: 1580fail:
1581 return dentry; 1581 return dentry;
1582} 1582}
1583EXPORT_SYMBOL_GPL(lookup_create);
1583 1584
1584int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) 1585int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
1585{ 1586{
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 67423c696c0a..6fd57f154197 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
15static inline void set_node_proc_entry(struct device_node *np, struct proc_dir_entry *de) 15static inline void set_node_proc_entry(struct device_node *np,
16{ 16 struct proc_dir_entry *de)
17}
18
19static void inline set_node_name_link(struct device_node *np, struct proc_dir_entry *de)
20{
21}
22
23static 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 */
61void proc_device_tree_add_node(struct device_node *np, struct proc_dir_entry *de) 54void 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
diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index da23ba75f3d5..c47f8fd31a2d 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -230,7 +230,6 @@ const struct reiserfs_key MAX_KEY = {
230 __constant_cpu_to_le32(0xffffffff)},} 230 __constant_cpu_to_le32(0xffffffff)},}
231}; 231};
232 232
233const struct in_core_key MAX_IN_CORE_KEY = {~0U, ~0U, ~0ULL>>4, 15};
234 233
235/* Get delimiting key of the buffer by looking for it in the buffers in the path, starting from the bottom 234/* Get delimiting key of the buffer by looking for it in the buffers in the path, starting from the bottom
236 of the path, and going upwards. We must check the path's validity at each step. If the key is not in 235 of the path, and going upwards. We must check the path's validity at each step. If the key is not in
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 31e75125f48b..b35b87744983 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -164,7 +164,9 @@ static int finish_unfinished (struct super_block * s)
164 164
165 /* compose key to look for "save" links */ 165 /* compose key to look for "save" links */
166 max_cpu_key.version = KEY_FORMAT_3_5; 166 max_cpu_key.version = KEY_FORMAT_3_5;
167 max_cpu_key.on_disk_key = MAX_IN_CORE_KEY; 167 max_cpu_key.on_disk_key.k_dir_id = ~0U;
168 max_cpu_key.on_disk_key.k_objectid = ~0U;
169 set_cpu_key_k_offset (&max_cpu_key, ~0U);
168 max_cpu_key.key_length = 3; 170 max_cpu_key.key_length = 3;
169 171
170#ifdef CONFIG_QUOTA 172#ifdef CONFIG_QUOTA
diff --git a/fs/udf/udftime.c b/fs/udf/udftime.c
index 457a8fe28575..85d8dbe843f1 100644
--- a/fs/udf/udftime.c
+++ b/fs/udf/udftime.c
@@ -46,7 +46,7 @@
46#endif 46#endif
47 47
48/* How many days come before each month (0-12). */ 48/* How many days come before each month (0-12). */
49const unsigned short int __mon_yday[2][13] = 49static const unsigned short int __mon_yday[2][13] =
50{ 50{
51 /* Normal years. */ 51 /* Normal years. */
52 { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, 52 { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 9278e9aba9ba..93ce257cd149 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -886,7 +886,6 @@ xfs_page_state_convert(
886 SetPageUptodate(page); 886 SetPageUptodate(page);
887 887
888 if (startio) { 888 if (startio) {
889 WARN_ON(page_dirty);
890 xfs_submit_page(page, wbc, bh_arr, cnt, 0, !page_dirty); 889 xfs_submit_page(page, wbc, bh_arr, cnt, 0, !page_dirty);
891 } 890 }
892 891
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index d0d412afd261..24fa3b101b93 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -565,7 +565,7 @@ struct file_operations linvfs_file_operations = {
565 .sendfile = linvfs_sendfile, 565 .sendfile = linvfs_sendfile,
566 .unlocked_ioctl = linvfs_ioctl, 566 .unlocked_ioctl = linvfs_ioctl,
567#ifdef CONFIG_COMPAT 567#ifdef CONFIG_COMPAT
568 .compat_ioctl = xfs_compat_ioctl, 568 .compat_ioctl = linvfs_compat_ioctl,
569#endif 569#endif
570 .mmap = linvfs_file_mmap, 570 .mmap = linvfs_file_mmap,
571 .open = linvfs_open, 571 .open = linvfs_open,
@@ -587,7 +587,7 @@ struct file_operations linvfs_invis_file_operations = {
587 .sendfile = linvfs_sendfile, 587 .sendfile = linvfs_sendfile,
588 .unlocked_ioctl = linvfs_ioctl_invis, 588 .unlocked_ioctl = linvfs_ioctl_invis,
589#ifdef CONFIG_COMPAT 589#ifdef CONFIG_COMPAT
590 .compat_ioctl = xfs_compat_invis_ioctl, 590 .compat_ioctl = linvfs_compat_invis_ioctl,
591#endif 591#endif
592 .mmap = linvfs_file_mmap, 592 .mmap = linvfs_file_mmap,
593 .open = linvfs_open, 593 .open = linvfs_open,
@@ -600,6 +600,9 @@ struct file_operations linvfs_dir_operations = {
600 .read = generic_read_dir, 600 .read = generic_read_dir,
601 .readdir = linvfs_readdir, 601 .readdir = linvfs_readdir,
602 .unlocked_ioctl = linvfs_ioctl, 602 .unlocked_ioctl = linvfs_ioctl,
603#ifdef CONFIG_COMPAT
604 .compat_ioctl = linvfs_compat_ioctl,
605#endif
603 .fsync = linvfs_fsync, 606 .fsync = linvfs_fsync,
604}; 607};
605 608
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index 7a12c83184f5..0f8f1384eb36 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved. 2 * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as 5 * under the terms of version 2 of the GNU General Public License as
@@ -58,8 +58,9 @@ typedef struct xfs_fsop_bulkreq32 {
58 __s32 ocount; /* output count pointer */ 58 __s32 ocount; /* output count pointer */
59} xfs_fsop_bulkreq32_t; 59} xfs_fsop_bulkreq32_t;
60 60
61static unsigned long 61STATIC unsigned long
62xfs_ioctl32_bulkstat(unsigned long arg) 62xfs_ioctl32_bulkstat(
63 unsigned long arg)
63{ 64{
64 xfs_fsop_bulkreq32_t __user *p32 = (void __user *)arg; 65 xfs_fsop_bulkreq32_t __user *p32 = (void __user *)arg;
65 xfs_fsop_bulkreq_t __user *p = compat_alloc_user_space(sizeof(*p)); 66 xfs_fsop_bulkreq_t __user *p = compat_alloc_user_space(sizeof(*p));
@@ -78,11 +79,11 @@ xfs_ioctl32_bulkstat(unsigned long arg)
78} 79}
79#endif 80#endif
80 81
81static long 82STATIC long
82__xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg) 83__linvfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg)
83{ 84{
84 int error; 85 int error;
85 struct inode *inode = f->f_dentry->d_inode; 86 struct inode *inode = f->f_dentry->d_inode;
86 vnode_t *vp = LINVFS_GET_VP(inode); 87 vnode_t *vp = LINVFS_GET_VP(inode);
87 88
88 switch (cmd) { 89 switch (cmd) {
@@ -152,12 +153,20 @@ __xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg)
152 return error; 153 return error;
153} 154}
154 155
155long xfs_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg) 156long
157linvfs_compat_ioctl(
158 struct file *f,
159 unsigned cmd,
160 unsigned long arg)
156{ 161{
157 return __xfs_compat_ioctl(0, f, cmd, arg); 162 return __linvfs_compat_ioctl(0, f, cmd, arg);
158} 163}
159 164
160long xfs_compat_invis_ioctl(struct file *f, unsigned cmd, unsigned long arg) 165long
166linvfs_compat_invis_ioctl(
167 struct file *f,
168 unsigned cmd,
169 unsigned long arg)
161{ 170{
162 return __xfs_compat_ioctl(IO_INVIS, f, cmd, arg); 171 return __linvfs_compat_ioctl(IO_INVIS, f, cmd, arg);
163} 172}
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.h b/fs/xfs/linux-2.6/xfs_ioctl32.h
index 779f69a48116..c874793a1dc9 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.h
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved. 2 * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as 5 * under the terms of version 2 of the GNU General Public License as
@@ -30,5 +30,5 @@
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ 30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31 */ 31 */
32 32
33long xfs_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg); 33long linvfs_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg);
34long xfs_compat_invis_ioctl(struct file *f, unsigned cmd, unsigned long arg); 34long linvfs_compat_invis_ioctl(struct file *f, unsigned cmd, unsigned long arg);
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 53dc658cafa6..455e2b2fb964 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. 2 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as 5 * under the terms of version 2 of the GNU General Public License as
@@ -66,7 +66,6 @@
66#include "xfs_buf_item.h" 66#include "xfs_buf_item.h"
67#include "xfs_utils.h" 67#include "xfs_utils.h"
68#include "xfs_version.h" 68#include "xfs_version.h"
69#include "xfs_ioctl32.h"
70 69
71#include <linux/namei.h> 70#include <linux/namei.h>
72#include <linux/init.h> 71#include <linux/init.h>
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 991f8a61f7c4..469e1a7939d4 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -278,7 +278,9 @@ phase2:
278 switch (flags & (BMAPI_WRITE|BMAPI_ALLOCATE|BMAPI_UNWRITTEN)) { 278 switch (flags & (BMAPI_WRITE|BMAPI_ALLOCATE|BMAPI_UNWRITTEN)) {
279 case BMAPI_WRITE: 279 case BMAPI_WRITE:
280 /* If we found an extent, return it */ 280 /* If we found an extent, return it */
281 if (nimaps && (imap.br_startblock != HOLESTARTBLOCK)) { 281 if (nimaps &&
282 (imap.br_startblock != HOLESTARTBLOCK) &&
283 (imap.br_startblock != DELAYSTARTBLOCK)) {
282 xfs_iomap_map_trace(XFS_IOMAP_WRITE_MAP, io, 284 xfs_iomap_map_trace(XFS_IOMAP_WRITE_MAP, io,
283 offset, count, iomapp, &imap, flags); 285 offset, count, iomapp, &imap, flags);
284 break; 286 break;