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

Commit 954d7a1c authored by Jeff Layton's avatar Jeff Layton Committed by Steve French
Browse files

cifs: make dnotify thread experimental code



Now that tasks sleeping in wait_for_response will time out on their own,
we're not reliant on the dnotify thread to do this. Mark it as
experimental code for now.

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 72ca545b
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line Diff line number Diff line
@@ -66,7 +66,9 @@ unsigned int sign_CIFS_PDUs = 1;
extern struct task_struct *oplockThread; /* remove sparse warning */
extern struct task_struct *oplockThread; /* remove sparse warning */
struct task_struct *oplockThread = NULL;
struct task_struct *oplockThread = NULL;
/* extern struct task_struct * dnotifyThread; remove sparse warning */
/* extern struct task_struct * dnotifyThread; remove sparse warning */
#ifdef CONFIG_CIFS_EXPERIMENTAL
static struct task_struct *dnotifyThread = NULL;
static struct task_struct *dnotifyThread = NULL;
#endif
static const struct super_operations cifs_super_ops;
static const struct super_operations cifs_super_ops;
unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
module_param(CIFSMaxBufSize, int, 0);
module_param(CIFSMaxBufSize, int, 0);
@@ -1049,6 +1051,7 @@ static int cifs_oplock_thread(void *dummyarg)
	return 0;
	return 0;
}
}


#ifdef CONFIG_CIFS_EXPERIMENTAL
static int cifs_dnotify_thread(void *dummyarg)
static int cifs_dnotify_thread(void *dummyarg)
{
{
	struct list_head *tmp;
	struct list_head *tmp;
@@ -1074,6 +1077,7 @@ static int cifs_dnotify_thread(void *dummyarg)


	return 0;
	return 0;
}
}
#endif


static int __init
static int __init
init_cifs(void)
init_cifs(void)
@@ -1151,16 +1155,20 @@ init_cifs(void)
		goto out_unregister_dfs_key_type;
		goto out_unregister_dfs_key_type;
	}
	}


#ifdef CONFIG_CIFS_EXPERIMENTAL
	dnotifyThread = kthread_run(cifs_dnotify_thread, NULL, "cifsdnotifyd");
	dnotifyThread = kthread_run(cifs_dnotify_thread, NULL, "cifsdnotifyd");
	if (IS_ERR(dnotifyThread)) {
	if (IS_ERR(dnotifyThread)) {
		rc = PTR_ERR(dnotifyThread);
		rc = PTR_ERR(dnotifyThread);
		cERROR(1, ("error %d create dnotify thread", rc));
		cERROR(1, ("error %d create dnotify thread", rc));
		goto out_stop_oplock_thread;
		goto out_stop_oplock_thread;
	}
	}
#endif


	return 0;
	return 0;


#ifdef CONFIG_CIFS_EXPERIMENTAL
 out_stop_oplock_thread:
 out_stop_oplock_thread:
#endif
	kthread_stop(oplockThread);
	kthread_stop(oplockThread);
 out_unregister_dfs_key_type:
 out_unregister_dfs_key_type:
#ifdef CONFIG_CIFS_DFS_UPCALL
#ifdef CONFIG_CIFS_DFS_UPCALL
@@ -1199,8 +1207,10 @@ exit_cifs(void)
	cifs_destroy_inodecache();
	cifs_destroy_inodecache();
	cifs_destroy_mids();
	cifs_destroy_mids();
	cifs_destroy_request_bufs();
	cifs_destroy_request_bufs();
	kthread_stop(oplockThread);
#ifdef CONFIG_CIFS_EXPERIMENTAL
	kthread_stop(dnotifyThread);
	kthread_stop(dnotifyThread);
#endif
	kthread_stop(oplockThread);
}
}


MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>");
MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>");