Commit 63fd7d04 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

staging: lustre: remove current_pid() and current_comm()



Just use current->pid and current->comm directly, instead
of having wrappers.

Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7b8e2026
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -48,10 +48,6 @@
 * kernel_cap_t
 */

/* check if task is running in compat mode.*/
#define current_pid()		(current->pid)
#define current_comm()		(current->comm)

typedef u32 cfs_cap_t;

#define CFS_CAP_FS_MASK (BIT(CAP_CHOWN) |		\
+1 −1
Original line number Diff line number Diff line
@@ -373,7 +373,7 @@ void libcfs_debug_dumplog(void)
	add_wait_queue(&debug_ctlwq, &wait);

	dumper = kthread_run(libcfs_debug_dumplog_thread,
			     (void *)(long)current_pid(),
			     (void *)(long)current->pid,
			     "libcfs_debug_dumper");
	set_current_state(TASK_INTERRUPTIBLE);
	if (IS_ERR(dumper))
+1 −1
Original line number Diff line number Diff line
@@ -1558,7 +1558,7 @@ struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,

	lock->l_req_mode = mode;
	lock->l_ast_data = data;
	lock->l_pid = current_pid();
	lock->l_pid = current->pid;
	if (cbs) {
		lock->l_blocking_ast = cbs->lcs_blocking;
		lock->l_completion_ast = cbs->lcs_completion;
+1 −1
Original line number Diff line number Diff line
@@ -1140,7 +1140,7 @@ dentry_may_statahead(struct inode *dir, struct dentry *dentry)
		return false;

	/* not the same process, don't statahead */
	if (lli->lli_opendir_pid != current_pid())
	if (lli->lli_opendir_pid != current->pid)
		return false;

	/*
+3 −3
Original line number Diff line number Diff line
@@ -1075,7 +1075,7 @@ static int ll_statahead_thread(void *arg)
			CDEBUG(D_READA, "Statahead for dir " DFID " hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n",
			       PFID(&lli->lli_fid), sai->sai_hit,
			       sai->sai_miss, sai->sai_sent,
			       sai->sai_replied, current_pid());
			       sai->sai_replied, current->pid);
			break;
		}
	}
@@ -1147,7 +1147,7 @@ void ll_authorize_statahead(struct inode *dir, void *key)
		 */
		LASSERT(!lli->lli_opendir_pid);
		lli->lli_opendir_key = key;
		lli->lli_opendir_pid = current_pid();
		lli->lli_opendir_pid = current->pid;
		lli->lli_sa_enabled = 1;
	}
	spin_unlock(&lli->lli_sa_lock);
@@ -1506,7 +1506,7 @@ static int start_statahead_thread(struct inode *dir, struct dentry *dentry)
	atomic_inc(&ll_i2sbi(parent->d_inode)->ll_sa_running);

	CDEBUG(D_READA, "start statahead thread: [pid %d] [parent %pd]\n",
	       current_pid(), parent);
	       current->pid, parent);

	task = kthread_create(ll_statahead_thread, parent, "ll_sa_%u",
			      lli->lli_opendir_pid);
Loading