Re: [PATCH v7 20/28] fanotify: Support enqueueing of error events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Amir Goldstein <amir73il@xxxxxxxxx> writes:

> On Fri, Oct 15, 2021 at 12:39 AM Gabriel Krisman Bertazi
> <krisman@xxxxxxxxxxxxx> wrote:
>>
>> Once an error event is triggered, collect the data from the fs error
>> report and enqueue it in the notification group, similarly to what is
>> done for other events.  FAN_FS_ERROR is no longer handled specially,
>> since the memory is now handled by a preallocated mempool.
>>
>> For now, make the event unhashed.  A future patch implements merging for
>> these kinds of events.
>>
>> Signed-off-by: Gabriel Krisman Bertazi <krisman@xxxxxxxxxxxxx>
>> ---
>>  fs/notify/fanotify/fanotify.c | 35 +++++++++++++++++++++++++++++++++++
>>  fs/notify/fanotify/fanotify.h |  6 ++++++
>>  2 files changed, 41 insertions(+)
>>
>> diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
>> index 01d68dfc74aa..9b970359570a 100644
>> --- a/fs/notify/fanotify/fanotify.c
>> +++ b/fs/notify/fanotify/fanotify.c
>> @@ -574,6 +574,27 @@ static struct fanotify_event *fanotify_alloc_name_event(struct inode *id,
>>         return &fne->fae;
>>  }
>>
>> +static struct fanotify_event *fanotify_alloc_error_event(
>> +                                               struct fsnotify_group *group,
>> +                                               __kernel_fsid_t *fsid,
>> +                                               const void *data, int data_type)
>> +{
>> +       struct fs_error_report *report =
>> +                       fsnotify_data_error_report(data, data_type);
>> +       struct fanotify_error_event *fee;
>> +
>> +       if (WARN_ON(!report))
>
> WARN_ON_ONCE please.
>
> Commit message claims to collect the data from the report,
> but this commit does nothing with the report??

I moved it out to a separate commit and forgot to update the commit
message.  Fixed. Thanks!

-- 
Gabriel Krisman Bertazi



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux