Commit 8c7dc730 authored by Steve French's avatar Steve French

Error mapping workaround for NT4 bug of reporting oldstyle DOS error for ERR...

Error mapping workaround for NT4 bug of reporting oldstyle DOS error for ERR invalid level (shows up on attempts to do SetPathInfo to NT4).
Call posix_lock_wait to avoid fs/locks.c panic per Trond's suggestion

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent 95b7394b
......@@ -3630,12 +3630,7 @@ CIFSSMBSetTimesLegacy(int xid, struct cifsTconInfo *tcon, char *fileName,
pSMB->ParameterCount = cpu_to_le16(params);
pSMB->TotalDataCount = pSMB->DataCount;
pSMB->TotalParameterCount = pSMB->ParameterCount;
/* I doubt that passthrough levels apply to this old
preNT info level */
/* if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)
pSMB->InformationLevel = cpu_to_le16(SMB_SET_FILE_BASIC_INFO2);
else*/
pSMB->InformationLevel = cpu_to_le16(SMB_INFO_STANDARD);
pSMB->InformationLevel = cpu_to_le16(SMB_INFO_STANDARD);
pSMB->Reserved4 = 0;
pSMB->hdr.smb_buf_length += byte_count;
memcpy(data_offset, data, sizeof (FILE_INFO_STANDARD));
......
......@@ -598,8 +598,7 @@ cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
pfLock->fl_start, numUnlock, numLock, lockType,
wait_flag);
if (rc == 0 && (pfLock->fl_flags & FL_POSIX))
if(experimEnabled)
posix_lock_file(file, pfLock);
posix_lock_file_wait(file, pfLock);
FreeXid(xid);
return rc;
}
......
......@@ -980,6 +980,16 @@ cifs_setattr(struct dentry *direntry, struct iattr *attrs)
via Handle (SetFileInfo) instead of by path */
rc = CIFSSMBSetTimes(xid, pTcon, full_path, &time_buf,
cifs_sb->local_nls);
if(rc == -EOPNOTSUPP) {
cFYI(1,("OS2 level of SetPathInfo not implemented"));
/* Need to convert time_buf into old format,
but probably better to do that inside the function
below rather than here */
/* Better to return EOPNOTSUPP until function
below is ready */
/* CIFSSMBSetTimesLegacy(xid, pTcon, full_path,
FILE_INFO_STANDARD * data, cifs_sb->local_nls); */
}
}
/* do not need local check to inode_check_ok since the server does that */
......
......@@ -754,7 +754,8 @@ static const struct {
ERRDOS, ERRnoaccess, 0xc000028e}, {
ERRDOS, ERRnoaccess, 0xc000028f}, {
ERRDOS, ERRnoaccess, 0xc0000290}, {
ERRDOS, ERRbadfunc, 0xc000029c},};
ERRDOS, ERRbadfunc, 0xc000029c}, {
ERRDOS, ERRinvlevel, 0x007c0001}, };
/*****************************************************************************
Print an error message from the status code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment