mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 00:26:39 +08:00
[PATCH] cifs: Gracefully turn off serverino (when serverino is enabled on mount)
Old servers such as NT4 do not support this level of FindFirst (and retry with a lower infolevel) Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
f654bac222
commit
75cf6bdc52
@ -206,7 +206,7 @@ static const struct {
|
|||||||
{
|
{
|
||||||
ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL}, {
|
ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL}, {
|
||||||
ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED}, {
|
ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED}, {
|
||||||
ERRDOS, 87, NT_STATUS_INVALID_INFO_CLASS}, {
|
ERRDOS, ERRinvlevel, NT_STATUS_INVALID_INFO_CLASS}, {
|
||||||
ERRDOS, 24, NT_STATUS_INFO_LENGTH_MISMATCH}, {
|
ERRDOS, 24, NT_STATUS_INFO_LENGTH_MISMATCH}, {
|
||||||
ERRHRD, ERRgeneral, NT_STATUS_ACCESS_VIOLATION}, {
|
ERRHRD, ERRgeneral, NT_STATUS_ACCESS_VIOLATION}, {
|
||||||
ERRHRD, ERRgeneral, NT_STATUS_IN_PAGE_ERROR}, {
|
ERRHRD, ERRgeneral, NT_STATUS_IN_PAGE_ERROR}, {
|
||||||
|
@ -323,6 +323,7 @@ static int initiate_cifs_search(const int xid, struct file *file)
|
|||||||
|
|
||||||
cFYI(1, ("Full path: %s start at: %lld ", full_path, file->f_pos));
|
cFYI(1, ("Full path: %s start at: %lld ", full_path, file->f_pos));
|
||||||
|
|
||||||
|
ffirst_retry:
|
||||||
/* test for Unix extensions */
|
/* test for Unix extensions */
|
||||||
if (pTcon->ses->capabilities & CAP_UNIX) {
|
if (pTcon->ses->capabilities & CAP_UNIX) {
|
||||||
cifsFile->srch_inf.info_level = SMB_FIND_FILE_UNIX;
|
cifsFile->srch_inf.info_level = SMB_FIND_FILE_UNIX;
|
||||||
@ -336,6 +337,11 @@ static int initiate_cifs_search(const int xid, struct file *file)
|
|||||||
&cifsFile->netfid, &cifsFile->srch_inf);
|
&cifsFile->netfid, &cifsFile->srch_inf);
|
||||||
if(rc == 0)
|
if(rc == 0)
|
||||||
cifsFile->invalidHandle = FALSE;
|
cifsFile->invalidHandle = FALSE;
|
||||||
|
if((rc == -EOPNOTSUPP) &&
|
||||||
|
(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) {
|
||||||
|
cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM;
|
||||||
|
goto ffirst_retry;
|
||||||
|
}
|
||||||
kfree(full_path);
|
kfree(full_path);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user