}
/* called by scanner after use, sa_entry will be killed */
-static void
-sa_put(struct inode *dir, struct ll_statahead_info *sai, struct sa_entry *entry)
+static void sa_put(struct inode *dir, struct ll_statahead_info *sai,
+ struct sa_entry *entry, bool inuse)
{
struct ll_inode_info *lli = ll_i2info(dir);
struct sa_entry *tmp;
bool wakeup = false;
- bool inuse = false;
if (entry && entry->se_state == SA_ENTRY_SUCC) {
struct ll_sb_info *sbi = ll_i2sbi(sai->sai_dentry->d_inode);
struct ll_dentry_data *lld;
struct ll_inode_info *lli = ll_i2info(dir);
struct ll_statahead_info *info = NULL;
+ bool inuse = false;
int rc = 0;
ENTRY;
LASSERTF(sai != NULL, "pattern %#X entry %p se_sai %p %pd lli %p\n",
lli->lli_sa_pattern, entry, entry->se_sai, *dentryp, lli);
+ inuse = true;
if (!sa_ready(entry)) {
spin_lock(&lli->lli_sa_lock);
sai->sai_index_wait = entry->se_index;
if (lld)
lld->lld_sa_generation = lli->lli_sa_generation;
rcu_read_unlock();
- sa_put(dir, sai, entry);
+ sa_put(dir, sai, entry, inuse);
RETURN(rc);
}