diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-03-13 16:34:48 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-03-13 16:35:16 +0100 |
commit | df8d291f28aa1e8437c8f7816328a6516379c71b (patch) | |
tree | 26ae585aa259584ddd0d9088933547c065c37086 /fs/cifs/dir.c | |
parent | 5234ffb9f74cfa8993d174782bc861dd9b7b5bfb (diff) | |
parent | fde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff) | |
download | op-kernel-dev-df8d291f28aa1e8437c8f7816328a6516379c71b.zip op-kernel-dev-df8d291f28aa1e8437c8f7816328a6516379c71b.tar.gz |
Merge branch 'linus' into irq/core
Reason: Get upstream fixes integrated before further modifications.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 63a196b..bc7e244 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -584,10 +584,26 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, * If either that or op not supported returned, follow * the normal lookup. */ - if ((rc == 0) || (rc == -ENOENT)) + 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: posix_open = true; - else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP)) + case -EOPNOTSUPP: + break; + default: pTcon->broken_posix_open = true; + } } if (!posix_open) rc = cifs_get_inode_info_unix(&newInode, full_path, |