浏览代码

deprecate smbfs in favour of cifs

smbfs is a bit buggy and has no maintainer.  Change it to shout at the user on
the first five mount attempts - tell them to switch to CIFS.

Come December we'll mark it BROKEN and see what happens.

[olecom@flower.upol.cz: documentation update]
Cc: Urban Widmark <urban@teststation.com>
Acked-by: Steven French <sfrench@us.ibm.com>
Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton 17 年之前
父节点
当前提交
c773633916
共有 2 个文件被更改,包括 21 次插入14 次删除
  1. 14 14
      fs/Kconfig
  2. 7 0
      fs/smbfs/inode.c

+ 14 - 14
fs/Kconfig

@@ -1152,7 +1152,7 @@ config BEFS_DEBUG
 	depends on BEFS_FS
 	depends on BEFS_FS
 	help
 	help
 	  If you say Y here, you can use the 'debug' mount option to enable
 	  If you say Y here, you can use the 'debug' mount option to enable
-	  debugging output from the driver. 
+	  debugging output from the driver.
 
 
 config BFS_FS
 config BFS_FS
 	tristate "BFS file system support (EXPERIMENTAL)"
 	tristate "BFS file system support (EXPERIMENTAL)"
@@ -1263,7 +1263,7 @@ config JFFS2_FS_XATTR
 	  Extended attributes are name:value pairs associated with inodes by
 	  Extended attributes are name:value pairs associated with inodes by
 	  the kernel or by users (see the attr(5) manual page, or visit
 	  the kernel or by users (see the attr(5) manual page, or visit
 	  <http://acl.bestbits.at/> for details).
 	  <http://acl.bestbits.at/> for details).
-	  
+
 	  If unsure, say N.
 	  If unsure, say N.
 
 
 config JFFS2_FS_POSIX_ACL
 config JFFS2_FS_POSIX_ACL
@@ -1274,10 +1274,10 @@ config JFFS2_FS_POSIX_ACL
 	help
 	help
 	  Posix Access Control Lists (ACLs) support permissions for users and
 	  Posix Access Control Lists (ACLs) support permissions for users and
 	  groups beyond the owner/group/world scheme.
 	  groups beyond the owner/group/world scheme.
-	  
+
 	  To learn more about Access Control Lists, visit the Posix ACLs for
 	  To learn more about Access Control Lists, visit the Posix ACLs for
 	  Linux website <http://acl.bestbits.at/>.
 	  Linux website <http://acl.bestbits.at/>.
-	  
+
 	  If you don't know what Access Control Lists are, say N
 	  If you don't know what Access Control Lists are, say N
 
 
 config JFFS2_FS_SECURITY
 config JFFS2_FS_SECURITY
@@ -1289,7 +1289,7 @@ config JFFS2_FS_SECURITY
 	  implemented by security modules like SELinux.  This option
 	  implemented by security modules like SELinux.  This option
 	  enables an extended attribute handler for file security
 	  enables an extended attribute handler for file security
 	  labels in the jffs2 filesystem.
 	  labels in the jffs2 filesystem.
-	  
+
 	  If you are not using a security module that requires using
 	  If you are not using a security module that requires using
 	  extended attributes for file security labels, say N.
 	  extended attributes for file security labels, say N.
 
 
@@ -1835,7 +1835,7 @@ config RPCSEC_GSS_SPKM3
 	  If unsure, say N.
 	  If unsure, say N.
 
 
 config SMB_FS
 config SMB_FS
-	tristate "SMB file system support (to mount Windows shares etc.)"
+	tristate "SMB file system support (OBSOLETE, please use CIFS)"
 	depends on INET
 	depends on INET
 	select NLS
 	select NLS
 	help
 	help
@@ -1858,8 +1858,8 @@ config SMB_FS
 	  General information about how to connect Linux, Windows machines and
 	  General information about how to connect Linux, Windows machines and
 	  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
 	  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
 
 
-	  To compile the SMB support as a module, choose M here: the module will
-	  be called smbfs.  Most people say N, however.
+	  To compile the SMB support as a module, choose M here:
+	  the module will be called smbfs.  Most people say N, however.
 
 
 config SMB_NLS_DEFAULT
 config SMB_NLS_DEFAULT
 	bool "Use a default NLS"
 	bool "Use a default NLS"
@@ -1891,7 +1891,7 @@ config SMB_NLS_REMOTE
 	  smbmount from samba 2.2.0 or later supports this.
 	  smbmount from samba 2.2.0 or later supports this.
 
 
 config CIFS
 config CIFS
-	tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)"
+	tristate "CIFS support (advanced network filesystem, SMBFS successor)"
 	depends on INET
 	depends on INET
 	select NLS
 	select NLS
 	help
 	help
@@ -1949,16 +1949,16 @@ config CIFS_WEAK_PW_HASH
 	  LANMAN based servers such as OS/2 and Windows 95, but such
 	  LANMAN based servers such as OS/2 and Windows 95, but such
 	  mounts may be less secure than mounts using NTLM or more recent
 	  mounts may be less secure than mounts using NTLM or more recent
 	  security mechanisms if you are on a public network.  Unless you
 	  security mechanisms if you are on a public network.  Unless you
-	  have a need to access old SMB servers (and are on a private 
+	  have a need to access old SMB servers (and are on a private
 	  network) you probably want to say N.  Even if this support
 	  network) you probably want to say N.  Even if this support
 	  is enabled in the kernel build, LANMAN authentication will not be
 	  is enabled in the kernel build, LANMAN authentication will not be
 	  used automatically. At runtime LANMAN mounts are disabled but
 	  used automatically. At runtime LANMAN mounts are disabled but
 	  can be set to required (or optional) either in
 	  can be set to required (or optional) either in
 	  /proc/fs/cifs (see fs/cifs/README for more detail) or via an
 	  /proc/fs/cifs (see fs/cifs/README for more detail) or via an
-	  option on the mount command. This support is disabled by 
+	  option on the mount command. This support is disabled by
 	  default in order to reduce the possibility of a downgrade
 	  default in order to reduce the possibility of a downgrade
 	  attack.
 	  attack.
- 
+
 	  If unsure, say N.
 	  If unsure, say N.
 
 
 config CIFS_XATTR
 config CIFS_XATTR
@@ -1999,7 +1999,7 @@ config CIFS_DEBUG2
 	   messages in some error paths, slowing performance. This
 	   messages in some error paths, slowing performance. This
 	   option can be turned off unless you are debugging
 	   option can be turned off unless you are debugging
 	   cifs problems.  If unsure, say N.
 	   cifs problems.  If unsure, say N.
-	   
+
 config CIFS_EXPERIMENTAL
 config CIFS_EXPERIMENTAL
 	  bool "CIFS Experimental Features (EXPERIMENTAL)"
 	  bool "CIFS Experimental Features (EXPERIMENTAL)"
 	  depends on CIFS && EXPERIMENTAL
 	  depends on CIFS && EXPERIMENTAL
@@ -2090,7 +2090,7 @@ config CODA_FS_OLD_API
 	  However this new API is not backward compatible with older
 	  However this new API is not backward compatible with older
 	  clients. If you really need to run the old Coda userspace
 	  clients. If you really need to run the old Coda userspace
 	  cache manager then say Y.
 	  cache manager then say Y.
-	  
+
 	  For most cases you probably want to say N.
 	  For most cases you probably want to say N.
 
 
 config AFS_FS
 config AFS_FS

+ 7 - 0
fs/smbfs/inode.c

@@ -500,6 +500,13 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
 	struct smb_fattr root;
 	struct smb_fattr root;
 	int ver;
 	int ver;
 	void *mem;
 	void *mem;
+	static int warn_count;
+
+	if (warn_count < 5) {
+		warn_count++;
+		printk(KERN_EMERG "smbfs is deprecated and will be removed"
+			"from the 2.6.27 kernel.  Please migrate to cifs\n");
+	}
 
 
 	if (!raw_data)
 	if (!raw_data)
 		goto out_no_data;
 		goto out_no_data;