Skip to content

Commit

Permalink
ksmbd: work 10
Browse files Browse the repository at this point in the history
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Jun 6, 2024
1 parent 931249c commit 54db626
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions vfs_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ static int ksmbd_durable_scavenger(void *dummy)
__msecs_to_jiffies(min_timeout));
pr_err("2 min_timeout : %u, jiffies_to_msecs : %u, alive : %d\n", min_timeout, jiffies_to_msecs(jiffies), ksmbd_durable_scavenger_alive());
if (remaining_jiffies)
min_timeout = fp->durable_timeout = jiffies_to_msecs(remaining_jiffies);
min_timeout = jiffies_to_msecs(remaining_jiffies);
else
min_timeout = DURABLE_HANDLE_MAX_TIMEOUT;
write_lock(&global_ft.lock);
Expand All @@ -846,15 +846,21 @@ static int ksmbd_durable_scavenger(void *dummy)
continue;

found_fp_timeout = true;
if (fp->durable_scavenger_timeout <
if (fp->durable_scavenger_timeout <=
jiffies_to_msecs(jiffies)) {
pr_err("closed!!!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
__ksmbd_remove_durable_fd(fp);
list_add(&fp->node, &scavenger_list);
}
} else {
unsigned long durable_timeout;

durable_timeout =
fp->durable_scavenger_timeout -
jiffies_to_msecs(jiffies);

if (min_timeout > fp->durable_timeout)
min_timeout = fp->durable_timeout;
if (min_timeout > durable_timeout)
min_timeout = durable_timeout;
}
}
write_unlock(&global_ft.lock);

Expand Down

0 comments on commit 54db626

Please sign in to comment.