]> granicus.if.org Git - zfs/commitdiff
Remove .readdir from zpl_file_operations table
authorCaleb James DeLisle <calebdelisle@lavabit.com>
Tue, 16 Apr 2013 09:23:39 +0000 (05:23 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Apr 2013 22:36:47 +0000 (15:36 -0700)
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 <behlendorf1@llnl.gov>
Closes #1404

module/zfs/zpl_file.c

index 9c27b7f1d3b2f614a0e996f980da858780ab8548..db6a72c982fa9ed55202dfdd8260b915c32c63e2 100644 (file)
@@ -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