diff options
-rw-r--r-- | fs/notify/fdinfo.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c index cb996179abfd..514c4b81483d 100644 --- a/fs/notify/fdinfo.c +++ b/fs/notify/fdinfo.c | |||
@@ -111,29 +111,33 @@ int inotify_show_fdinfo(struct seq_file *m, struct file *f) | |||
111 | 111 | ||
112 | static int fanotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark) | 112 | static int fanotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark) |
113 | { | 113 | { |
114 | unsigned int mflags = 0; | ||
114 | struct inode *inode; | 115 | struct inode *inode; |
115 | int ret = 0; | 116 | int ret = 0; |
116 | 117 | ||
117 | if (!(mark->flags & FSNOTIFY_MARK_FLAG_ALIVE)) | 118 | if (!(mark->flags & FSNOTIFY_MARK_FLAG_ALIVE)) |
118 | return 0; | 119 | return 0; |
119 | 120 | ||
121 | if (mark->flags & FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY) | ||
122 | mflags |= FAN_MARK_IGNORED_SURV_MODIFY; | ||
123 | |||
120 | if (mark->flags & FSNOTIFY_MARK_FLAG_INODE) { | 124 | if (mark->flags & FSNOTIFY_MARK_FLAG_INODE) { |
121 | inode = igrab(mark->i.inode); | 125 | inode = igrab(mark->i.inode); |
122 | if (!inode) | 126 | if (!inode) |
123 | goto out; | 127 | goto out; |
124 | ret = seq_printf(m, "fanotify ino:%lx sdev:%x " | 128 | ret = seq_printf(m, "fanotify ino:%lx sdev:%x " |
125 | "mask:%x ignored_mask:%x ", | 129 | "mflags:%x mask:%x ignored_mask:%x ", |
126 | inode->i_ino, inode->i_sb->s_dev, | 130 | inode->i_ino, inode->i_sb->s_dev, |
127 | mark->mask, mark->ignored_mask); | 131 | mflags, mark->mask, mark->ignored_mask); |
128 | ret |= show_mark_fhandle(m, inode); | 132 | ret |= show_mark_fhandle(m, inode); |
129 | ret |= seq_putc(m, '\n'); | 133 | ret |= seq_putc(m, '\n'); |
130 | iput(inode); | 134 | iput(inode); |
131 | } else if (mark->flags & FSNOTIFY_MARK_FLAG_VFSMOUNT) { | 135 | } else if (mark->flags & FSNOTIFY_MARK_FLAG_VFSMOUNT) { |
132 | struct mount *mnt = real_mount(mark->m.mnt); | 136 | struct mount *mnt = real_mount(mark->m.mnt); |
133 | 137 | ||
134 | ret = seq_printf(m, "fanotify mnt_id:%x mask:%x " | 138 | ret = seq_printf(m, "fanotify mnt_id:%x mflags:%x mask:%x " |
135 | "ignored_mask:%x\n", | 139 | "ignored_mask:%x\n", mnt->mnt_id, mflags, |
136 | mnt->mnt_id, mark->mask, mark->ignored_mask); | 140 | mark->mask, mark->ignored_mask); |
137 | } | 141 | } |
138 | out: | 142 | out: |
139 | return ret; | 143 | return ret; |