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 <behlendorf1@llnl.gov>
Closes #1404
This commit is contained in:
Caleb James DeLisle 2013-04-16 05:23:39 -04:00 committed by Brian Behlendorf
parent b28e57cb82
commit 8f1e11b610

View 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