From: Cyrill Gorcunov Date: Thu, 29 Nov 2012 03:19:20 +0000 (+1100) Subject: fs, notify: don't forget to provide fhandle for inode fanotify X-Git-Tag: next-20121205~1^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4c29de2324935333b58d1f3a80416d54b8a635b1;p=karo-tx-linux.git fs, notify: don't forget to provide fhandle for inode fanotify For inode based fanotify I missed to add fhandle output. This patch brings it in. | pos: 0 | flags: 02 | fanotify ino:2 sdev:800013 mask:1 ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:0200000000000000 Signed-off-by: Cyrill Gorcunov Cc: Pavel Emelyanov Cc: Oleg Nesterov Cc: Andrey Vagin Cc: Al Viro Cc: Alexey Dobriyan Cc: James Bottomley Cc: "Aneesh Kumar K.V" Cc: Alexey Dobriyan Cc: Matthew Helsley Cc: "J. Bruce Fields" Cc: "Aneesh Kumar K.V" Cc: Tvrtko Ursulin Signed-off-by: Andrew Morton --- diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c index b80d7d80fdff..2e063d009f66 100644 --- a/fs/notify/fdinfo.c +++ b/fs/notify/fdinfo.c @@ -36,8 +36,6 @@ static int show_fdinfo(struct seq_file *m, struct file *f, return ret; } -#ifdef CONFIG_INOTIFY_USER - #if defined(CONFIG_EXPORTFS) static int show_mark_fhandle(struct seq_file *m, struct inode *inode) { @@ -74,6 +72,8 @@ static int show_mark_fhandle(struct seq_file *m, struct inode *inode) } #endif +#ifdef CONFIG_INOTIFY_USER + static int inotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark) { struct inotify_inode_mark *inode_mark; @@ -121,9 +121,11 @@ static int fanotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark) if (!inode) goto out; ret = seq_printf(m, "fanotify ino:%lx sdev:%x " - "mask:%x ignored_mask:%x\n", + "mask:%x ignored_mask:%x ", inode->i_ino, inode->i_sb->s_dev, mark->mask, mark->ignored_mask); + ret |= show_mark_fhandle(m, inode); + ret |= seq_putc(m, '\n'); iput(inode); } else if (mark->flags & FSNOTIFY_MARK_FLAG_VFSMOUNT) { struct mount *mnt = real_mount(mark->m.mnt);