lkml.org 
[lkml]   [2023]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V4 3/5] cachefiles: resend an open request if the read request's object is closed
Date
Jia Zhu <zhujia.zj@bytedance.com> wrote:

> + struct cachefiles_object *object =
> + ((struct cachefiles_ondemand_info *)work)->object;

container_of().

> + continue;
> + } else if (cachefiles_ondemand_object_is_reopening(object)) {

The "else" is unnecessary.

> +static void ondemand_object_worker(struct work_struct *work)
> +{
> + struct cachefiles_object *object =
> + ((struct cachefiles_ondemand_info *)work)->object;
> +
> + cachefiles_ondemand_init_object(object);
> +}

I can't help but feel there's some missing exclusion/locking. This feels like
it really ought to be driven from the fscache object state machine.

\
 
 \ /
  Last update: 2023-03-28 16:15    [W:0.235 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site