From: Marc Dionne Date: Fri, 5 Nov 2010 21:30:02 +0000 (-0400) Subject: Linux: define llseek operations X-Git-Tag: openafs-stable-1_4_13~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=498bcb64dfb2164cf510c2e13d9460d2cbf6f00c;p=packages%2Fo%2Fopenafs.git Linux: define llseek operations With kernel 2.6.37 it is now mandatory to define the llseek operation for files and directories. If these are not defined, no_llseek is called, and any attempt to seek returns ESPIPE. Most file systems use generic_file_llseek, but it seems safer to use default_llseek which is what the vfs used to call for us by default. In 2.6.37 these two functions are actually functionally identical. Reviewed-on: http://gerrit.openafs.org/3292 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from commit fb6b22cf77039962f22f462ee602f0e4a8153817) Reviewed-on: http://gerrit.openafs.org/3512 Tested-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d0e31ec418555354ac30516269a9748ee01fc36f) Change-Id: If90a5ac65a9ccd1d1301884065e9583ad25f5af4 Reviewed-on: http://gerrit.openafs.org/3527 --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 17ca9179b..5bb232344 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -700,6 +700,7 @@ struct file_operations afs_dir_fops = { #endif .open = afs_linux_open, .release = afs_linux_release, + .llseek = default_llseek, }; struct file_operations afs_file_fops = { @@ -733,6 +734,7 @@ struct file_operations afs_file_fops = { #ifdef STRUCT_FILE_OPERATIONS_HAS_FLOCK .flock = afs_linux_flock, #endif + .llseek = default_llseek, };