]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fs, notify: don't forget to provide fhandle for inode fanotify
authorCyrill Gorcunov <gorcunov@openvz.org>
Thu, 29 Nov 2012 03:19:20 +0000 (14:19 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:59 +0000 (16:23 +1100)
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 <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrey Vagin <avagin@openvz.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: James Bottomley <jbottomley@parallels.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Matthew Helsley <matt.helsley@gmail.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/notify/fdinfo.c

index b80d7d80fdff34a8c4537c5352ce741da94593f9..2e063d009f66b36f2d2bf252a75545585e526522 100644 (file)
@@ -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);