From: Caleb James DeLisle Date: Tue, 16 Apr 2013 09:23:39 +0000 (-0400) Subject: Remove .readdir from zpl_file_operations table X-Git-Tag: zfs-0.6.2~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f1e11b6105bf46a4258958eb3dcae2ab21ed8b2;p=zfs Remove .readdir from zpl_file_operations table The zpl_readdir() function shouldn't be registered as part of the zpl_file_operations table, it must only be part of the zpl_dir_file_operations table. By removing this callback the VFS will now correctly return ENOTDIR when calling getdents() on a file. Signed-off-by: Brian Behlendorf Closes #1404 --- diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c index 9c27b7f1d..db6a72c98 100644 --- a/module/zfs/zpl_file.c +++ b/module/zfs/zpl_file.c @@ -446,7 +446,6 @@ const struct file_operations zpl_file_operations = { .llseek = generic_file_llseek, .read = zpl_read, .write = zpl_write, - .readdir = zpl_readdir, .mmap = zpl_mmap, .fsync = zpl_fsync, #ifdef HAVE_FILE_FALLOCATE