Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 442a9ffa authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS updates from Steve French.

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6: (29 commits)
  cifs: fix oops while traversing open file list (try #4)
  cifs: Fix comment as d_alloc_root() is replaced by d_make_root()
  CIFS: Introduce SMB2 mounts as vers=2.1
  CIFS: Introduce SMB2 Kconfig option
  CIFS: Move add/set_credits and get_credits_field to ops structure
  CIFS: Move protocol specific demultiplex thread calls to ops struct
  CIFS: Move protocol specific part from cifs_readv_receive to ops struct
  CIFS: Move header_size/max_header_size to ops structure
  CIFS: Move protocol specific part from SendReceive2 to ops struct
  cifs: Include backup intent search flags during searches {try #2)
  CIFS: Separate protocol specific part from setlk
  CIFS: Separate protocol specific part from getlk
  CIFS: Separate protocol specific lock type handling
  CIFS: Convert lock type to 32 bit variable
  CIFS: Move locks to cifsFileInfo structure
  cifs: convert send_nt_cancel into a version specific op
  cifs: add a smb_version_operations/values structures and a smb_version enum
  cifs: remove the vers= and version= synonyms for ver=
  cifs: add warning about change in default cache semantics in 3.7
  cifs: display cache= option in /proc/mounts
  ...
parents 4b781474 2c0c2a08
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -158,3 +158,23 @@ config CIFS_NFSD_EXPORT
	  depends on CIFS && EXPERIMENTAL && BROKEN
	  help
	   Allows NFS server to export a CIFS mounted share (nfsd over cifs)

config CIFS_SMB2
	bool "SMB2 network file system support (EXPERIMENTAL)"
	depends on EXPERIMENTAL && INET && BROKEN
	select NLS
	select KEYS
	select FSCACHE
	select DNS_RESOLVER

	help
	  This enables experimental support for the SMB2 (Server Message Block
	  version 2) protocol. The SMB2 protocol is the successor to the
	  popular CIFS and SMB network file sharing protocols. SMB2 is the
	  native file sharing mechanism for recent versions of Windows
	  operating systems (since Vista).  SMB2 enablement will eventually
	  allow users better performance, security and features, than would be
	  possible with cifs. Note that smb2 mount options also are simpler
	  (compared to cifs) due to protocol improvements.

	  Unless you are a developer or tester, say N.
+3 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ obj-$(CONFIG_CIFS) += cifs.o
cifs-y := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o \
	  link.o misc.o netmisc.o smbencrypt.o transport.o asn1.o \
	  cifs_unicode.o nterr.o xattr.o cifsencrypt.o \
	  readdir.o ioctl.o sess.o export.o
	  readdir.o ioctl.o sess.o export.o smb1ops.o

cifs-$(CONFIG_CIFS_ACL) += cifsacl.o

@@ -15,3 +15,5 @@ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o

cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o

cifs-$(CONFIG_CIFS_SMB2) += smb2ops.o
+0 −5
Original line number Diff line number Diff line
@@ -608,11 +608,6 @@ Stats Lists summary resource usage information as well as per
			in the kernel configuration.

Configuration pseudo-files:
MultiuserMount		If set to one, more than one CIFS session to 
			the same server ip address can be established
			if more than one uid accesses the same mount
			point and if the uids user/password mapping
			information is available. (default is 0)
PacketSigningEnabled	If set to one, cifs packet signing is enabled
			and will be used if the server requires 
			it.  If set to two, cifs packet signing is
+4 −52
Original line number Diff line number Diff line
@@ -57,19 +57,21 @@ cifs_dump_mem(char *label, void *data, int length)
	}
}

#ifdef CONFIG_CIFS_DEBUG2
void cifs_dump_detail(void *buf)
{
#ifdef CONFIG_CIFS_DEBUG2
	struct smb_hdr *smb = (struct smb_hdr *)buf;

	cERROR(1, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d",
		  smb->Command, smb->Status.CifsError,
		  smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
	cERROR(1, "smb buf %p len %d", smb, smbCalcSize(smb));
#endif /* CONFIG_CIFS_DEBUG2 */
}

void cifs_dump_mids(struct TCP_Server_Info *server)
{
#ifdef CONFIG_CIFS_DEBUG2
	struct list_head *tmp;
	struct mid_q_entry *mid_entry;

@@ -102,8 +104,8 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
		}
	}
	spin_unlock(&GlobalMid_Lock);
}
#endif /* CONFIG_CIFS_DEBUG2 */
}

#ifdef CONFIG_PROC_FS
static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
@@ -420,7 +422,6 @@ static struct proc_dir_entry *proc_fs_cifs;
static const struct file_operations cifsFYI_proc_fops;
static const struct file_operations cifs_lookup_cache_proc_fops;
static const struct file_operations traceSMB_proc_fops;
static const struct file_operations cifs_multiuser_mount_proc_fops;
static const struct file_operations cifs_security_flags_proc_fops;
static const struct file_operations cifs_linux_ext_proc_fops;

@@ -440,8 +441,6 @@ cifs_proc_init(void)
	proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops);
	proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs,
		    &cifs_linux_ext_proc_fops);
	proc_create("MultiuserMount", 0, proc_fs_cifs,
		    &cifs_multiuser_mount_proc_fops);
	proc_create("SecurityFlags", 0, proc_fs_cifs,
		    &cifs_security_flags_proc_fops);
	proc_create("LookupCacheEnabled", 0, proc_fs_cifs,
@@ -460,7 +459,6 @@ cifs_proc_clean(void)
#ifdef CONFIG_CIFS_STATS
	remove_proc_entry("Stats", proc_fs_cifs);
#endif
	remove_proc_entry("MultiuserMount", proc_fs_cifs);
	remove_proc_entry("SecurityFlags", proc_fs_cifs);
	remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs);
	remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
@@ -617,52 +615,6 @@ static const struct file_operations traceSMB_proc_fops = {
	.write		= traceSMB_proc_write,
};

static int cifs_multiuser_mount_proc_show(struct seq_file *m, void *v)
{
	seq_printf(m, "%d\n", multiuser_mount);
	return 0;
}

static int cifs_multiuser_mount_proc_open(struct inode *inode, struct file *fh)
{
	return single_open(fh, cifs_multiuser_mount_proc_show, NULL);
}

static ssize_t cifs_multiuser_mount_proc_write(struct file *file,
		const char __user *buffer, size_t count, loff_t *ppos)
{
	char c;
	int rc;
	static bool warned;

	rc = get_user(c, buffer);
	if (rc)
		return rc;
	if (c == '0' || c == 'n' || c == 'N')
		multiuser_mount = 0;
	else if (c == '1' || c == 'y' || c == 'Y') {
		multiuser_mount = 1;
		if (!warned) {
			warned = true;
			printk(KERN_WARNING "CIFS VFS: The legacy multiuser "
				"mount code is scheduled to be deprecated in "
				"3.5. Please switch to using the multiuser "
				"mount option.");
		}
	}

	return count;
}

static const struct file_operations cifs_multiuser_mount_proc_fops = {
	.owner		= THIS_MODULE,
	.open		= cifs_multiuser_mount_proc_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= single_release,
	.write		= cifs_multiuser_mount_proc_write,
};

static int cifs_security_flags_proc_show(struct seq_file *m, void *v)
{
	seq_printf(m, "0x%x\n", global_secflags);
+2 −2
Original line number Diff line number Diff line
@@ -24,10 +24,10 @@
#define _H_CIFS_DEBUG

void cifs_dump_mem(char *label, void *data, int length);
#ifdef CONFIG_CIFS_DEBUG2
#define DBG2 2
void cifs_dump_detail(void *);
void cifs_dump_mids(struct TCP_Server_Info *);
#ifdef CONFIG_CIFS_DEBUG2
#define DBG2 2
#else
#define DBG2 0
#endif
Loading