diff options
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r-- | fs/cifs/smb1ops.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index 52131d8cb4d5..d2979036a4c7 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "cifsproto.h" | 23 | #include "cifsproto.h" |
24 | #include "cifs_debug.h" | 24 | #include "cifs_debug.h" |
25 | #include "cifspdu.h" | 25 | #include "cifspdu.h" |
26 | #include "cifs_unicode.h" | ||
26 | 27 | ||
27 | /* | 28 | /* |
28 | * An NT cancel request header looks just like the original request except: | 29 | * An NT cancel request header looks just like the original request except: |
@@ -530,13 +531,11 @@ cifs_is_path_accessible(const unsigned int xid, struct cifs_tcon *tcon, | |||
530 | 531 | ||
531 | rc = CIFSSMBQPathInfo(xid, tcon, full_path, file_info, | 532 | rc = CIFSSMBQPathInfo(xid, tcon, full_path, file_info, |
532 | 0 /* not legacy */, cifs_sb->local_nls, | 533 | 0 /* not legacy */, cifs_sb->local_nls, |
533 | cifs_sb->mnt_cifs_flags & | 534 | cifs_remap(cifs_sb)); |
534 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
535 | 535 | ||
536 | if (rc == -EOPNOTSUPP || rc == -EINVAL) | 536 | if (rc == -EOPNOTSUPP || rc == -EINVAL) |
537 | rc = SMBQueryInformation(xid, tcon, full_path, file_info, | 537 | rc = SMBQueryInformation(xid, tcon, full_path, file_info, |
538 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | 538 | cifs_sb->local_nls, cifs_remap(cifs_sb)); |
539 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
540 | kfree(file_info); | 539 | kfree(file_info); |
541 | return rc; | 540 | return rc; |
542 | } | 541 | } |
@@ -552,8 +551,7 @@ cifs_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, | |||
552 | 551 | ||
553 | /* could do find first instead but this returns more info */ | 552 | /* could do find first instead but this returns more info */ |
554 | rc = CIFSSMBQPathInfo(xid, tcon, full_path, data, 0 /* not legacy */, | 553 | rc = CIFSSMBQPathInfo(xid, tcon, full_path, data, 0 /* not legacy */, |
555 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | 554 | cifs_sb->local_nls, cifs_remap(cifs_sb)); |
556 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
557 | /* | 555 | /* |
558 | * BB optimize code so we do not make the above call when server claims | 556 | * BB optimize code so we do not make the above call when server claims |
559 | * no NT SMB support and the above call failed at least once - set flag | 557 | * no NT SMB support and the above call failed at least once - set flag |
@@ -562,8 +560,7 @@ cifs_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, | |||
562 | if ((rc == -EOPNOTSUPP) || (rc == -EINVAL)) { | 560 | if ((rc == -EOPNOTSUPP) || (rc == -EINVAL)) { |
563 | rc = SMBQueryInformation(xid, tcon, full_path, data, | 561 | rc = SMBQueryInformation(xid, tcon, full_path, data, |
564 | cifs_sb->local_nls, | 562 | cifs_sb->local_nls, |
565 | cifs_sb->mnt_cifs_flags & | 563 | cifs_remap(cifs_sb)); |
566 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
567 | *adjustTZ = true; | 564 | *adjustTZ = true; |
568 | } | 565 | } |
569 | 566 | ||
@@ -611,8 +608,7 @@ cifs_get_srv_inum(const unsigned int xid, struct cifs_tcon *tcon, | |||
611 | */ | 608 | */ |
612 | return CIFSGetSrvInodeNumber(xid, tcon, full_path, uniqueid, | 609 | return CIFSGetSrvInodeNumber(xid, tcon, full_path, uniqueid, |
613 | cifs_sb->local_nls, | 610 | cifs_sb->local_nls, |
614 | cifs_sb->mnt_cifs_flags & | 611 | cifs_remap(cifs_sb)); |
615 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
616 | } | 612 | } |
617 | 613 | ||
618 | static int | 614 | static int |
@@ -703,8 +699,7 @@ cifs_mkdir_setinfo(struct inode *inode, const char *full_path, | |||
703 | dosattrs = cifsInode->cifsAttrs|ATTR_READONLY; | 699 | dosattrs = cifsInode->cifsAttrs|ATTR_READONLY; |
704 | info.Attributes = cpu_to_le32(dosattrs); | 700 | info.Attributes = cpu_to_le32(dosattrs); |
705 | rc = CIFSSMBSetPathInfo(xid, tcon, full_path, &info, cifs_sb->local_nls, | 701 | rc = CIFSSMBSetPathInfo(xid, tcon, full_path, &info, cifs_sb->local_nls, |
706 | cifs_sb->mnt_cifs_flags & | 702 | cifs_remap(cifs_sb)); |
707 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
708 | if (rc == 0) | 703 | if (rc == 0) |
709 | cifsInode->cifsAttrs = dosattrs; | 704 | cifsInode->cifsAttrs = dosattrs; |
710 | } | 705 | } |
@@ -720,8 +715,7 @@ cifs_open_file(const unsigned int xid, struct cifs_open_parms *oparms, | |||
720 | oparms->create_options, | 715 | oparms->create_options, |
721 | &oparms->fid->netfid, oplock, buf, | 716 | &oparms->fid->netfid, oplock, buf, |
722 | oparms->cifs_sb->local_nls, | 717 | oparms->cifs_sb->local_nls, |
723 | oparms->cifs_sb->mnt_cifs_flags | 718 | cifs_remap(oparms->cifs_sb)); |
724 | & CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
725 | return CIFS_open(xid, oparms, oplock, buf); | 719 | return CIFS_open(xid, oparms, oplock, buf); |
726 | } | 720 | } |
727 | 721 | ||
@@ -749,21 +743,21 @@ cifs_flush_file(const unsigned int xid, struct cifs_tcon *tcon, | |||
749 | } | 743 | } |
750 | 744 | ||
751 | static int | 745 | static int |
752 | cifs_sync_read(const unsigned int xid, struct cifsFileInfo *cfile, | 746 | cifs_sync_read(const unsigned int xid, struct cifs_fid *pfid, |
753 | struct cifs_io_parms *parms, unsigned int *bytes_read, | 747 | struct cifs_io_parms *parms, unsigned int *bytes_read, |
754 | char **buf, int *buf_type) | 748 | char **buf, int *buf_type) |
755 | { | 749 | { |
756 | parms->netfid = cfile->fid.netfid; | 750 | parms->netfid = pfid->netfid; |
757 | return CIFSSMBRead(xid, parms, bytes_read, buf, buf_type); | 751 | return CIFSSMBRead(xid, parms, bytes_read, buf, buf_type); |
758 | } | 752 | } |
759 | 753 | ||
760 | static int | 754 | static int |
761 | cifs_sync_write(const unsigned int xid, struct cifsFileInfo *cfile, | 755 | cifs_sync_write(const unsigned int xid, struct cifs_fid *pfid, |
762 | struct cifs_io_parms *parms, unsigned int *written, | 756 | struct cifs_io_parms *parms, unsigned int *written, |
763 | struct kvec *iov, unsigned long nr_segs) | 757 | struct kvec *iov, unsigned long nr_segs) |
764 | { | 758 | { |
765 | 759 | ||
766 | parms->netfid = cfile->fid.netfid; | 760 | parms->netfid = pfid->netfid; |
767 | return CIFSSMBWrite2(xid, parms, written, iov, nr_segs); | 761 | return CIFSSMBWrite2(xid, parms, written, iov, nr_segs); |
768 | } | 762 | } |
769 | 763 | ||
@@ -800,8 +794,7 @@ smb_set_file_info(struct inode *inode, const char *full_path, | |||
800 | tcon = tlink_tcon(tlink); | 794 | tcon = tlink_tcon(tlink); |
801 | 795 | ||
802 | rc = CIFSSMBSetPathInfo(xid, tcon, full_path, buf, cifs_sb->local_nls, | 796 | rc = CIFSSMBSetPathInfo(xid, tcon, full_path, buf, cifs_sb->local_nls, |
803 | cifs_sb->mnt_cifs_flags & | 797 | cifs_remap(cifs_sb)); |
804 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
805 | if (rc == 0) { | 798 | if (rc == 0) { |
806 | cinode->cifsAttrs = le32_to_cpu(buf->Attributes); | 799 | cinode->cifsAttrs = le32_to_cpu(buf->Attributes); |
807 | goto out; | 800 | goto out; |