Commit 75d3bce2 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix reversed memset arguments
  Adds username in the upcall key for unattended mounts with keytab
  [CIFS] Remove redundant NULL check
parents a0abb93b 0a891adc
...@@ -119,6 +119,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) ...@@ -119,6 +119,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
dp = description + strlen(description); dp = description + strlen(description);
sprintf(dp, ";uid=0x%x", sesInfo->linux_uid); sprintf(dp, ";uid=0x%x", sesInfo->linux_uid);
dp = description + strlen(description);
sprintf(dp, ";user=%s", sesInfo->userName);
cFYI(1, ("key description = %s", description)); cFYI(1, ("key description = %s", description));
spnego_key = request_key(&cifs_spnego_key_type, description, ""); spnego_key = request_key(&cifs_spnego_key_type, description, "");
......
...@@ -2159,8 +2159,7 @@ CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char *fromName, ...@@ -2159,8 +2159,7 @@ CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char *fromName,
cFYI(1, ("Send error in copy = %d with %d files copied", cFYI(1, ("Send error in copy = %d with %d files copied",
rc, le16_to_cpu(pSMBr->CopyCount))); rc, le16_to_cpu(pSMBr->CopyCount)));
} }
if (pSMB) cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN) if (rc == -EAGAIN)
goto copyRetry; goto copyRetry;
...@@ -2249,8 +2248,7 @@ CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon, ...@@ -2249,8 +2248,7 @@ CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon,
if (rc) if (rc)
cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc)); cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc));
if (pSMB) cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN) if (rc == -EAGAIN)
goto createSymLinkRetry; goto createSymLinkRetry;
...@@ -4095,8 +4093,7 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, ...@@ -4095,8 +4093,7 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
target_nodes, nls_codepage); target_nodes, nls_codepage);
GetDFSRefExit: GetDFSRefExit:
if (pSMB) cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN) if (rc == -EAGAIN)
goto getDFSRetry; goto getDFSRetry;
...@@ -5117,8 +5114,7 @@ CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon, ...@@ -5117,8 +5114,7 @@ CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
if (rc) if (rc)
cFYI(1, ("SetPathInfo (perms) returned %d", rc)); cFYI(1, ("SetPathInfo (perms) returned %d", rc));
if (pSMB) cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN) if (rc == -EAGAIN)
goto setPermsRetry; goto setPermsRetry;
return rc; return rc;
...@@ -5340,8 +5336,7 @@ CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, ...@@ -5340,8 +5336,7 @@ CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
} }
} }
} }
if (pSMB) cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN) if (rc == -EAGAIN)
goto QAllEAsRetry; goto QAllEAsRetry;
...@@ -5490,8 +5485,7 @@ ssize_t CIFSSMBQueryEA(const int xid, struct cifsTconInfo *tcon, ...@@ -5490,8 +5485,7 @@ ssize_t CIFSSMBQueryEA(const int xid, struct cifsTconInfo *tcon,
} }
} }
} }
if (pSMB) cifs_buf_release(pSMB);
cifs_buf_release(pSMB);
if (rc == -EAGAIN) if (rc == -EAGAIN)
goto QEARetry; goto QEARetry;
......
...@@ -172,7 +172,7 @@ static void fill_fake_finddataunix(FILE_UNIX_BASIC_INFO *pfnd_dat, ...@@ -172,7 +172,7 @@ static void fill_fake_finddataunix(FILE_UNIX_BASIC_INFO *pfnd_dat,
{ {
struct inode *pinode = NULL; struct inode *pinode = NULL;
memset(pfnd_dat, sizeof(FILE_UNIX_BASIC_INFO), 0); memset(pfnd_dat, 0, sizeof(FILE_UNIX_BASIC_INFO));
/* __le64 pfnd_dat->EndOfFile = cpu_to_le64(0); /* __le64 pfnd_dat->EndOfFile = cpu_to_le64(0);
__le64 pfnd_dat->NumOfBytes = cpu_to_le64(0); __le64 pfnd_dat->NumOfBytes = cpu_to_le64(0);
...@@ -384,7 +384,7 @@ static int get_sfu_mode(struct inode *inode, ...@@ -384,7 +384,7 @@ static int get_sfu_mode(struct inode *inode,
static void fill_fake_finddata(FILE_ALL_INFO *pfnd_dat, static void fill_fake_finddata(FILE_ALL_INFO *pfnd_dat,
struct super_block *sb) struct super_block *sb)
{ {
memset(pfnd_dat, sizeof(FILE_ALL_INFO), 0); memset(pfnd_dat, 0, sizeof(FILE_ALL_INFO));
/* __le64 pfnd_dat->AllocationSize = cpu_to_le64(0); /* __le64 pfnd_dat->AllocationSize = cpu_to_le64(0);
__le64 pfnd_dat->EndOfFile = cpu_to_le64(0); __le64 pfnd_dat->EndOfFile = cpu_to_le64(0);
......
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