XFS currently doesn't set up a .llseek for directories and thus defaults
to default_llseek. default_llseek only takes the BKL which means there
is not exclusion vs xfs_readdir and thus we get a risk of corrupting
the file position. Additionally default_llseek only allows seeks to
32bit offsets by default.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2008-08-12
18:40:43.000000000 -0300
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c 2008-08-12 18:41:49.000000000
-0300
@@ -546,6 +546,7 @@ const struct file_operations xfs_dir_fil
.compat_ioctl = xfs_file_compat_ioctl,
#endif
.fsync = xfs_file_fsync,
+ .llseek = generic_file_llseek,
};
static struct vm_operations_struct xfs_file_vm_ops = {
|