aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-02-13 20:34:44 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-02-13 20:34:44 -0800
commitce5afed937f0a823d3b00c9459409c3f5f2fbd5d (patch)
treee2c488ad8a634812459fd733f87b673ccf1977d6
parentca81a62198e39ad9155f12725c269fcc2a9f1f8b (diff)
parentff4fa4a25a33f92b5653bb43add0c63bea98d464 (diff)
downloadkernel_goldelico_gta04-ce5afed937f0a823d3b00c9459409c3f5f2fbd5d.zip
kernel_goldelico_gta04-ce5afed937f0a823d3b00c9459409c3f5f2fbd5d.tar.gz
kernel_goldelico_gta04-ce5afed937f0a823d3b00c9459409c3f5f2fbd5d.tar.bz2
Merge git://git.samba.org/sfrench/cifs-2.6
* git://git.samba.org/sfrench/cifs-2.6: cifs: don't return error from standard_receive3 after marking response malformed cifs: request oplock when doing open on lookup cifs: fix error handling when cifscreds key payload is an error
-rw-r--r--fs/cifs/connect.c9
-rw-r--r--fs/cifs/dir.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 9c28865..602f77c 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -773,10 +773,11 @@ standard_receive3(struct TCP_Server_Info *server, struct mid_q_entry *mid)
cifs_dump_mem("Bad SMB: ", buf,
min_t(unsigned int, server->total_read, 48));
- if (mid)
- handle_mid(mid, server, smb_buffer, length);
+ if (!mid)
+ return length;
- return length;
+ handle_mid(mid, server, smb_buffer, length);
+ return 0;
}
static int
@@ -2125,7 +2126,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
down_read(&key->sem);
upayload = key->payload.data;
if (IS_ERR_OR_NULL(upayload)) {
- rc = PTR_ERR(key);
+ rc = upayload ? PTR_ERR(upayload) : -EINVAL;
goto out_key_put;
}
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index df8fecb..63a196b 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -492,7 +492,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
{
int xid;
int rc = 0; /* to get around spurious gcc warning, set to zero here */
- __u32 oplock = 0;
+ __u32 oplock = enable_oplocks ? REQ_OPLOCK : 0;
__u16 fileHandle = 0;
bool posix_open = false;
struct cifs_sb_info *cifs_sb;