lkml.org 
[lkml]   [2023]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v4 0/3] fanotify accounting for fs/splice.c
Always generate modify out, access in for splice;
this gets automatically merged with no ugly special cases.

No changes to 2/3 or 3/3.

Ahelenia Ziemiańska (3):
splice: always fsnotify_access(in), fsnotify_modify(out) on success
splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice
splice: fsnotify_access(in), fsnotify_modify(out) on success in tee

fs/splice.c | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)

Interdiff against v3:
diff --git a/fs/splice.c b/fs/splice.c
index 2ecfccbda956..bdbabc2ebfff 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1184,10 +1184,6 @@ long do_splice(struct file *in, loff_t *off_in, struct file *out,
out->f_pos = offset;
else
*off_out = offset;
-
- // splice_write-> already marked out
- // as modified via vfs_iter_write()
- goto noaccessout;
} else if (opipe) {
if (off_out)
return -ESPIPE;
@@ -1211,11 +1207,10 @@ long do_splice(struct file *in, loff_t *off_in, struct file *out,
} else
return -EINVAL;

- if (ret > 0)
+ if (ret > 0) {
fsnotify_modify(out);
-noaccessout:
- if (ret > 0)
fsnotify_access(in);
+ }

return ret;
}
--
2.39.2[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-06-27 22:51    [W:0.148 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site