lkml.org 
[lkml]   [2023]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/3] splice: always fsnotify_access(in), fsnotify_modify(out) on success
On Tue, Jun 27, 2023 at 09:10:09PM +0300, Amir Goldstein wrote:
> On Tue, Jun 27, 2023 at 7:55 PM Ahelenia Ziemiańska
> <nabijaczleweli@nabijaczleweli.xyz> wrote:
> > @@ -1209,18 +1204,20 @@ long do_splice(struct file *in, loff_t *off_in, struct file *out,
> >
> > ret = splice_file_to_pipe(in, opipe, &offset, len, flags);
> >
> > - if (ret > 0)
> > - fsnotify_access(in);
> > -
> > if (!off_in)
> > in->f_pos = offset;
> > else
> > *off_in = offset;
> > + } else
> > + return -EINVAL;
> >
> > - return ret;
> > - }
> > + if (ret > 0)
> > + fsnotify_modify(out);
> > +noaccessout:
> > + if (ret > 0)
> > + fsnotify_access(in);
> >
> As I wrote, I don't like this special case.
> I prefer that we generate double IN_MODIFY than
> having to maintain unreadable code.
>
> Let's see what Jan has to say about this.
Yes, in principle I definitely agree, but I don't know what the official
policy is on (effectively-)spurious/duplicate events; neither the kernel
documentation nor the manual speak to the reliability of the signal,
so I defaulted to the variant I thought to be correcter, if filthy.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-06-27 22:14    [W:0.070 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site