--- zzzz-none-000/linux-2.6.32.61/fs/cifs/dir.c 2013-06-10 09:43:48.000000000 +0000 +++ ar9-7330-650/linux-2.6.32.61/fs/cifs/dir.c 2010-09-02 10:10:37.000000000 +0000 @@ -691,26 +691,10 @@ * If either that or op not supported returned, follow * the normal lookup. */ - switch (rc) { - case 0: - /* - * The server may allow us to open things like - * FIFOs, but the client isn't set up to deal - * with that. If it's not a regular file, just - * close it and proceed as if it were a normal - * lookup. - */ - if (newInode && !S_ISREG(newInode->i_mode)) { - CIFSSMBClose(xid, pTcon, fileHandle); - break; - } - case -ENOENT: + if ((rc == 0) || (rc == -ENOENT)) posix_open = true; - case -EOPNOTSUPP: - break; - default: + else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP)) pTcon->broken_posix_open = true; - } } if (!posix_open) rc = cifs_get_inode_info_unix(&newInode, full_path,