Commit 0a049935 authored by Paulo Alcantara's avatar Paulo Alcantara Committed by Steve French
Browse files

smb: client: get rid of dfs naming in automount code



Automount code will handle both DFS links and reparse mount points.

Also, get rid of BUG_ON() in cifs_release_automount_timer() while
we're at it.

Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 561f82a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1805,7 +1805,7 @@ exit_cifs(void)
	cifs_dbg(NOISY, "exit_smb3\n");
	unregister_filesystem(&cifs_fs_type);
	unregister_filesystem(&smb3_fs_type);
	cifs_dfs_release_automount_timer();
	cifs_release_automount_timer();
	exit_cifs_idmap();
#ifdef CONFIG_CIFS_SWN_UPCALL
	cifs_genl_exit();
+3 −3
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ extern int cifs_fiemap(struct inode *, struct fiemap_extent_info *, u64 start,

extern const struct inode_operations cifs_file_inode_ops;
extern const struct inode_operations cifs_symlink_inode_ops;
extern const struct inode_operations cifs_dfs_referral_inode_operations;
extern const struct inode_operations cifs_namespace_inode_operations;


/* Functions related to files and directories */
@@ -119,9 +119,9 @@ extern const struct dentry_operations cifs_dentry_ops;
extern const struct dentry_operations cifs_ci_dentry_ops;

#ifdef CONFIG_CIFS_DFS_UPCALL
extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
extern struct vfsmount *cifs_d_automount(struct path *path);
#else
static inline struct vfsmount *cifs_dfs_d_automount(struct path *path)
static inline struct vfsmount *cifs_d_automount(struct path *path)
{
	return ERR_PTR(-EREMOTE);
}
+2 −2
Original line number Diff line number Diff line
@@ -296,9 +296,9 @@ extern void cifs_put_tcp_session(struct TCP_Server_Info *server,
extern void cifs_put_tcon(struct cifs_tcon *tcon);

#if IS_ENABLED(CONFIG_CIFS_DFS_UPCALL)
extern void cifs_dfs_release_automount_timer(void);
extern void cifs_release_automount_timer(void);
#else /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
#define cifs_dfs_release_automount_timer()	do { } while (0)
#define cifs_release_automount_timer()	do { } while (0)
#endif /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */

void cifs_proc_init(void);
+2 −2
Original line number Diff line number Diff line
@@ -797,7 +797,7 @@ cifs_d_revalidate(struct dentry *direntry, unsigned int flags)

const struct dentry_operations cifs_dentry_ops = {
	.d_revalidate = cifs_d_revalidate,
	.d_automount = cifs_dfs_d_automount,
	.d_automount = cifs_d_automount,
/* d_delete:       cifs_d_delete,      */ /* not needed except for debugging */
};

@@ -872,5 +872,5 @@ const struct dentry_operations cifs_ci_dentry_ops = {
	.d_revalidate = cifs_d_revalidate,
	.d_hash = cifs_ci_hash,
	.d_compare = cifs_ci_compare,
	.d_automount = cifs_dfs_d_automount,
	.d_automount = cifs_d_automount,
};
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static void cifs_set_ops(struct inode *inode)
	case S_IFDIR:
#ifdef CONFIG_CIFS_DFS_UPCALL
		if (IS_AUTOMOUNT(inode)) {
			inode->i_op = &cifs_dfs_referral_inode_operations;
			inode->i_op = &cifs_namespace_inode_operations;
		} else {
#else /* NO DFS support, treat as a directory */
		{
Loading