Linux 4.1: No need for do_sync_read
authorMarc Dionne <marc.dionne@your-file-system.com>
Mon, 20 Apr 2015 13:37:40 +0000 (10:37 -0300)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 May 2015 12:56:19 +0000 (08:56 -0400)
Make the test here a bit more specific. do_sync_read no longer
exists, but we don't use it for new kernels.  Trying to define it
here in terms of generic_file_read is not helpful as that doesn't
exist anymore.

Change-Id: Iffb059716165436c3439e66db15002cdec5dfc16
Reviewed-on: http://gerrit.openafs.org/11848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/afs/LINUX/osi_compat.h

index fe8ed04..e8816d5 100644 (file)
@@ -47,7 +47,7 @@ typedef struct path afs_linux_path_t;
 # endif
 #endif
 
-#ifndef HAVE_LINUX_DO_SYNC_READ
+#if !defined(HAVE_LINUX_DO_SYNC_READ) && !defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER)
 static inline int
 do_sync_read(struct file *fp, char *buf, size_t count, loff_t *offp) {
     return generic_file_read(fp, buf, count, offp);