aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/llite/statahead.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/statahead.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/statahead.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c
index 155ce3cf6f60..d864f5f36d85 100644
--- a/drivers/staging/lustre/lustre/llite/statahead.c
+++ b/drivers/staging/lustre/lustre/llite/statahead.c
@@ -523,7 +523,7 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)
* affect the performance.
*/
if (lli->lli_glimpse_time != 0 &&
- time_before(cfs_time_shift(-1), lli->lli_glimpse_time)) {
+ time_before(jiffies - 1 * HZ, lli->lli_glimpse_time)) {
up_write(&lli->lli_glimpse_sem);
lli->lli_agl_index = 0;
iput(inode);
@@ -535,7 +535,7 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)
cl_agl(inode);
lli->lli_agl_index = 0;
- lli->lli_glimpse_time = cfs_time_current();
+ lli->lli_glimpse_time = jiffies;
up_write(&lli->lli_glimpse_sem);
CDEBUG(D_READA, "Handled (init) async glimpse: inode= "
@@ -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);