]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: define llseek operations
authorMarc Dionne <marc.c.dionne@gmail.com>
Fri, 5 Nov 2010 21:30:02 +0000 (17:30 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 10 Dec 2010 16:38:02 +0000 (08:38 -0800)
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 <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit fb6b22cf77039962f22f462ee602f0e4a8153817)

Change-Id: I30890cc3ad3f1a932218b6c8aac653cf747cdf2c
Reviewed-on: http://gerrit.openafs.org/3495
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c

index de864bcb638c8fee7bc10df162ca1440882ae84a..fcc775b2743848c125f83d601426714f9279cfd4 100644 (file)
@@ -658,6 +658,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 = {
@@ -691,6 +692,7 @@ struct file_operations afs_file_fops = {
 #ifdef STRUCT_FILE_OPERATIONS_HAS_FLOCK
   .flock =     afs_linux_flock,
 #endif
+  .llseek =    default_llseek,
 };