aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifssmb.c2
-rw-r--r--fs/cifs/connect.c16
-rw-r--r--fs/cifs/inode.c11
-rw-r--r--fs/cifs/smb2ops.c1
4 files changed, 13 insertions, 17 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 7353bc5d73d7..8e2e799e7a24 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1909,12 +1909,12 @@ cifs_writev_requeue(struct cifs_writedata *wdata)
1909 } while (rc == -EAGAIN); 1909 } while (rc == -EAGAIN);
1910 1910
1911 for (i = 0; i < wdata->nr_pages; i++) { 1911 for (i = 0; i < wdata->nr_pages; i++) {
1912 unlock_page(wdata->pages[i]);
1912 if (rc != 0) { 1913 if (rc != 0) {
1913 SetPageError(wdata->pages[i]); 1914 SetPageError(wdata->pages[i]);
1914 end_page_writeback(wdata->pages[i]); 1915 end_page_writeback(wdata->pages[i]);
1915 page_cache_release(wdata->pages[i]); 1916 page_cache_release(wdata->pages[i]);
1916 } 1917 }
1917 unlock_page(wdata->pages[i]);
1918 } 1918 }
1919 1919
1920 mapping_set_error(inode->i_mapping, rc); 1920 mapping_set_error(inode->i_mapping, rc);
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 54125e04fd0c..991c63c6bdd0 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -97,7 +97,7 @@ enum {
97 Opt_user, Opt_pass, Opt_ip, 97 Opt_user, Opt_pass, Opt_ip,
98 Opt_unc, Opt_domain, 98 Opt_unc, Opt_domain,
99 Opt_srcaddr, Opt_prefixpath, 99 Opt_srcaddr, Opt_prefixpath,
100 Opt_iocharset, Opt_sockopt, 100 Opt_iocharset,
101 Opt_netbiosname, Opt_servern, 101 Opt_netbiosname, Opt_servern,
102 Opt_ver, Opt_vers, Opt_sec, Opt_cache, 102 Opt_ver, Opt_vers, Opt_sec, Opt_cache,
103 103
@@ -202,7 +202,6 @@ static const match_table_t cifs_mount_option_tokens = {
202 { Opt_srcaddr, "srcaddr=%s" }, 202 { Opt_srcaddr, "srcaddr=%s" },
203 { Opt_prefixpath, "prefixpath=%s" }, 203 { Opt_prefixpath, "prefixpath=%s" },
204 { Opt_iocharset, "iocharset=%s" }, 204 { Opt_iocharset, "iocharset=%s" },
205 { Opt_sockopt, "sockopt=%s" },
206 { Opt_netbiosname, "netbiosname=%s" }, 205 { Opt_netbiosname, "netbiosname=%s" },
207 { Opt_servern, "servern=%s" }, 206 { Opt_servern, "servern=%s" },
208 { Opt_ver, "ver=%s" }, 207 { Opt_ver, "ver=%s" },
@@ -1752,19 +1751,6 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
1752 */ 1751 */
1753 cFYI(1, "iocharset set to %s", string); 1752 cFYI(1, "iocharset set to %s", string);
1754 break; 1753 break;
1755 case Opt_sockopt:
1756 string = match_strdup(args);
1757 if (string == NULL)
1758 goto out_nomem;
1759
1760 if (strnicmp(string, "TCP_NODELAY", 11) == 0) {
1761 printk(KERN_WARNING "CIFS: the "
1762 "sockopt=TCP_NODELAY option has been "
1763 "deprecated and will be removed "
1764 "in 3.9\n");
1765 vol->sockopt_tcp_nodelay = 1;
1766 }
1767 break;
1768 case Opt_netbiosname: 1754 case Opt_netbiosname:
1769 string = match_strdup(args); 1755 string = match_strdup(args);
1770 if (string == NULL) 1756 if (string == NULL)
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 83f2606c76d0..0079696305c9 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -995,6 +995,15 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry,
995 return PTR_ERR(tlink); 995 return PTR_ERR(tlink);
996 tcon = tlink_tcon(tlink); 996 tcon = tlink_tcon(tlink);
997 997
998 /*
999 * We cannot rename the file if the server doesn't support
1000 * CAP_INFOLEVEL_PASSTHRU
1001 */
1002 if (!(tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)) {
1003 rc = -EBUSY;
1004 goto out;
1005 }
1006
998 rc = CIFSSMBOpen(xid, tcon, full_path, FILE_OPEN, 1007 rc = CIFSSMBOpen(xid, tcon, full_path, FILE_OPEN,
999 DELETE|FILE_WRITE_ATTRIBUTES, CREATE_NOT_DIR, 1008 DELETE|FILE_WRITE_ATTRIBUTES, CREATE_NOT_DIR,
1000 &netfid, &oplock, NULL, cifs_sb->local_nls, 1009 &netfid, &oplock, NULL, cifs_sb->local_nls,
@@ -1023,7 +1032,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry,
1023 current->tgid); 1032 current->tgid);
1024 /* although we would like to mark the file hidden 1033 /* although we would like to mark the file hidden
1025 if that fails we will still try to rename it */ 1034 if that fails we will still try to rename it */
1026 if (rc != 0) 1035 if (!rc)
1027 cifsInode->cifsAttrs = dosattr; 1036 cifsInode->cifsAttrs = dosattr;
1028 else 1037 else
1029 dosattr = origattr; /* since not able to change them */ 1038 dosattr = origattr; /* since not able to change them */
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index c9c7aa7ed966..bceffe7b8f8d 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -744,4 +744,5 @@ struct smb_version_values smb30_values = {
744 .cap_unix = 0, 744 .cap_unix = 0,
745 .cap_nt_find = SMB2_NT_FIND, 745 .cap_nt_find = SMB2_NT_FIND,
746 .cap_large_files = SMB2_LARGE_FILES, 746 .cap_large_files = SMB2_LARGE_FILES,
747 .oplock_read = SMB2_OPLOCK_LEVEL_II,
747}; 748};