>From 66a6c05ae2fbe6cfcb24ca3088de39885a6fa5b8 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 19 Dec 2017 13:38:54 +0100 Subject: [PATCH] fsnotify: Do not show file handles for unsupported filesystems Filesystems not setting their s_export_op do not support file handles. Do no try to encode them using exportfs_encode_inode_fh() since that may fail or return garbage. Reported-by: NeilBrown Signed-off-by: Jan Kara --- fs/notify/fdinfo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c index d478629c728b..041c2b0cc145 100644 --- a/fs/notify/fdinfo.c +++ b/fs/notify/fdinfo.c @@ -46,6 +46,9 @@ static void show_mark_fhandle(struct seq_file *m, struct inode *inode) } f; int size, ret, i; + if (!inode->i_sb->s_export_op) + return; + f.handle.handle_bytes = sizeof(f.pad); size = f.handle.handle_bytes >> 2; -- 2.12.3