Commit 9e39b0ae8af46c83b85dae7ff5251911a80fce5a

Authored by Steve French
1 parent d185cda771

[CIFS] Remove unneeded QuerySymlink call and fix mapping for unmapped status

Signed-off-by: Steve French <sfrench@us.ibm.com>

Showing 5 changed files with 12 additions and 11 deletions Side-by-side Diff

... ... @@ -3509,8 +3509,6 @@
3509 3509 struct nls_table *nls_info)
3510 3510 {
3511 3511 int rc = 0;
3512   - char ntlm_session_key[CIFS_SESS_KEY_SIZE];
3513   - bool ntlmv2_flag = false;
3514 3512 int first_time = 0;
3515 3513 struct TCP_Server_Info *server = pSesInfo->server;
3516 3514  
... ... @@ -257,13 +257,8 @@
257 257  
258 258 /* BB add read reparse point symlink code and
259 259 Unix extensions symlink code here BB */
260   -/* We could disable this based on pTcon->unix_ext flag instead ... but why? */
261   - if (cifs_sb->tcon->ses->capabilities & CAP_UNIX)
262   - rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path,
263   - tmpbuffer,
264   - len - 1,
265   - cifs_sb->local_nls);
266   - else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) {
  260 +
  261 + if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) {
267 262 cERROR(1, ("SFU style symlinks not implemented yet"));
268 263 /* add open and read as in fs/cifs/inode.c */
269 264 } else {
... ... @@ -79,6 +79,7 @@
79 79 {ErrQuota, -EDQUOT},
80 80 {ErrNotALink, -ENOLINK},
81 81 {ERRnetlogonNotStarted, -ENOPROTOOPT},
  82 + {ERRsymlink, -EOPNOTSUPP},
82 83 {ErrTooManyLinks, -EMLINK},
83 84 {0, 0}
84 85 };
... ... @@ -714,6 +715,7 @@
714 715 ERRDOS, ERRnoaccess, 0xc000028f}, {
715 716 ERRDOS, ERRnoaccess, 0xc0000290}, {
716 717 ERRDOS, ERRbadfunc, 0xc000029c}, {
  718 + ERRDOS, ERRsymlink, NT_STATUS_STOPPED_ON_SYMLINK}, {
717 719 ERRDOS, ERRinvlevel, 0x007c0001}, };
718 720  
719 721 /*****************************************************************************
... ... @@ -35,8 +35,6 @@
35 35 extern const struct nt_err_code_struct nt_errs[];
36 36  
37 37 /* Win32 Status codes. */
38   -
39   -#define STATUS_BUFFER_OVERFLOW 0x80000005
40 38 #define STATUS_MORE_ENTRIES 0x0105
41 39 #define ERROR_INVALID_PARAMETER 0x0057
42 40 #define ERROR_INSUFFICIENT_BUFFER 0x007a
... ... @@ -50,6 +48,13 @@
50 48 #define STATUS_SOME_UNMAPPED 0x0107
51 49 #define STATUS_BUFFER_OVERFLOW 0x80000005
52 50 #define NT_STATUS_NO_MORE_ENTRIES 0x8000001a
  51 +#define NT_STATUS_MEDIA_CHANGED 0x8000001c
  52 +#define NT_STATUS_END_OF_MEDIA 0x8000001e
  53 +#define NT_STATUS_MEDIA_CHECK 0x80000020
  54 +#define NT_STATUS_NO_DATA_DETECTED 0x8000001c
  55 +#define NT_STATUS_STOPPED_ON_SYMLINK 0x8000002d
  56 +#define NT_STATUS_DEVICE_REQUIRES_CLEANING 0x80000288
  57 +#define NT_STATUS_DEVICE_DOOR_OPEN 0x80000288
53 58 #define NT_STATUS_UNSUCCESSFUL 0xC0000000 | 0x0001
54 59 #define NT_STATUS_NOT_IMPLEMENTED 0xC0000000 | 0x0002
55 60 #define NT_STATUS_INVALID_INFO_CLASS 0xC0000000 | 0x0003
... ... @@ -110,6 +110,7 @@
110 110  
111 111 /* Below errors are used internally (do not come over the wire) for passthrough
112 112 from STATUS codes to POSIX only */
  113 +#define ERRsymlink 0xFFFD
113 114 #define ErrTooManyLinks 0xFFFE
114 115  
115 116 /* Following error codes may be generated with the ERRSRV error class.*/