summaryrefslogtreecommitdiffstats
path: root/fs/notify/fdinfo.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2022-04-22 15:03:12 +0300
committerJan Kara <jack@suse.cz>2022-04-25 14:37:03 +0200
commita32e697cda27679a0327ae2cafdad8c7170f548f (patch)
tree4118df5e9ffa55e6e7b0dcdc009e2ac14957ae86 /fs/notify/fdinfo.c
parentaf2d861d4cd2a4da5137f795ee3509e6f944a25b (diff)
downloadlinux-a32e697cda27679a0327ae2cafdad8c7170f548f.tar.gz
linux-a32e697cda27679a0327ae2cafdad8c7170f548f.tar.bz2
linux-a32e697cda27679a0327ae2cafdad8c7170f548f.zip
inotify: show inotify mask flags in proc fdinfo
The inotify mask flags IN_ONESHOT and IN_EXCL_UNLINK are not "internal to kernel" and should be exposed in procfs fdinfo so CRIU can restore them. Fixes: 6933599697c9 ("inotify: hide internal kernel bits from fdinfo") Link: https://lore.kernel.org/r/20220422120327.3459282-2-amir73il@gmail.com Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fdinfo.c')
-rw-r--r--fs/notify/fdinfo.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
index 57f0d5d9f934..3451708fd035 100644
--- a/fs/notify/fdinfo.c
+++ b/fs/notify/fdinfo.c
@@ -83,16 +83,9 @@ static void inotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark)
inode_mark = container_of(mark, struct inotify_inode_mark, fsn_mark);
inode = igrab(fsnotify_conn_inode(mark->connector));
if (inode) {
- /*
- * IN_ALL_EVENTS represents all of the mask bits
- * that we expose to userspace. There is at
- * least one bit (FS_EVENT_ON_CHILD) which is
- * used only internally to the kernel.
- */
- u32 mask = mark->mask & IN_ALL_EVENTS;
- seq_printf(m, "inotify wd:%x ino:%lx sdev:%x mask:%x ignored_mask:%x ",
+ seq_printf(m, "inotify wd:%x ino:%lx sdev:%x mask:%x ignored_mask:0 ",
inode_mark->wd, inode->i_ino, inode->i_sb->s_dev,
- mask, mark->ignored_mask);
+ inotify_mark_user_mask(mark));
show_mark_fhandle(m, inode);
seq_putc(m, '\n');
iput(inode);