]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/cifs/cifsfs.c
Merge branch 'for-5.4/wacom' into for-linus
[linux.git] / fs / cifs / cifsfs.c
index 24635b65effa7848005c815a955ea029270c6f5f..3289b566463f91cc913d886f7db3c41189746d90 100644 (file)
@@ -526,6 +526,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
                seq_puts(s, ",nobrl");
        if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_HANDLE_CACHE)
                seq_puts(s, ",nohandlecache");
+       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MODE_FROM_SID)
+               seq_puts(s, ",modefromsid");
        if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL)
                seq_puts(s, ",cifsacl");
        if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)
@@ -554,6 +556,11 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
        seq_printf(s, ",bsize=%u", cifs_sb->bsize);
        seq_printf(s, ",echo_interval=%lu",
                        tcon->ses->server->echo_interval / HZ);
+
+       /* Only display max_credits if it was overridden on mount */
+       if (tcon->ses->server->max_credits != SMB2_MAX_CREDITS_AVAILABLE)
+               seq_printf(s, ",max_credits=%u", tcon->ses->server->max_credits);
+
        if (tcon->snapshot_time)
                seq_printf(s, ",snapshot=%llu", tcon->snapshot_time);
        if (tcon->handle_timeout)
@@ -1097,6 +1104,10 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
                goto out;
        }
 
+       rc = -EOPNOTSUPP;
+       if (!target_tcon->ses->server->ops->copychunk_range)
+               goto out;
+
        /*
         * Note: cifs case is easier than btrfs since server responsible for
         * checks for proper open modes and file type and if it wants
@@ -1108,11 +1119,12 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
        /* should we flush first and last page first */
        truncate_inode_pages(&target_inode->i_data, 0);
 
-       if (target_tcon->ses->server->ops->copychunk_range)
+       rc = file_modified(dst_file);
+       if (!rc)
                rc = target_tcon->ses->server->ops->copychunk_range(xid,
                        smb_file_src, smb_file_target, off, len, destoff);
-       else
-               rc = -EOPNOTSUPP;
+
+       file_accessed(src_file);
 
        /* force revalidate of size and timestamps of target file now
         * that target is updated on the server
@@ -1517,11 +1529,9 @@ init_cifs(void)
                goto out_destroy_dfs_cache;
 #endif /* CONFIG_CIFS_UPCALL */
 
-#ifdef CONFIG_CIFS_ACL
        rc = init_cifs_idmap();
        if (rc)
                goto out_register_key_type;
-#endif /* CONFIG_CIFS_ACL */
 
        rc = register_filesystem(&cifs_fs_type);
        if (rc)
@@ -1536,10 +1546,8 @@ init_cifs(void)
        return 0;
 
 out_init_cifs_idmap:
-#ifdef CONFIG_CIFS_ACL
        exit_cifs_idmap();
 out_register_key_type:
-#endif
 #ifdef CONFIG_CIFS_UPCALL
        exit_cifs_spnego();
 out_destroy_dfs_cache:
@@ -1571,9 +1579,7 @@ exit_cifs(void)
        unregister_filesystem(&cifs_fs_type);
        unregister_filesystem(&smb3_fs_type);
        cifs_dfs_release_automount_timer();
-#ifdef CONFIG_CIFS_ACL
        exit_cifs_idmap();
-#endif
 #ifdef CONFIG_CIFS_UPCALL
        exit_cifs_spnego();
 #endif
@@ -1607,5 +1613,6 @@ MODULE_SOFTDEP("pre: sha256");
 MODULE_SOFTDEP("pre: sha512");
 MODULE_SOFTDEP("pre: aead2");
 MODULE_SOFTDEP("pre: ccm");
+MODULE_SOFTDEP("pre: gcm");
 module_init(init_cifs)
 module_exit(exit_cifs)