]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux 3.19: No more f_dentry
authorMarc Dionne <marc.dionne@your-file-system.com>
Mon, 5 Jan 2015 12:03:16 +0000 (07:03 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 23 Jan 2015 07:47:14 +0000 (02:47 -0500)
Back in kernel 2.6 .20 struct file lost its f_dentry field
which was replaced by f_path.To ease transition f_dentry
was defined as f_dpath.dentry in the same header.This
define finally gets removed with kernel 3.19.

Keep using f_dentry in the code, but add a configure test
for the presence of f_path and the absence of the f_dentry
macro so we can add it if its missing.

Change - Id:I8e8a7e4d3ddd861018de50af1eb7315e730ad529

Reviewed-on: http://gerrit.openafs.org/11646
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit f9ca302b7a10ffc36f2439e068333ab147791c5a)

Change-Id: I179bf2fbc22e824e40c60c59e5d223d49343e7a5
Reviewed-on: http://gerrit.openafs.org/11660
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
acinclude.m4
src/afs/LINUX/osi_compat.h

index fc665d58ac7d0d5482711048b61647a776a50242..94f21530ef342f10089d621cd9fa4332a6bd5e6f 100644 (file)
@@ -843,6 +843,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_mutex], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_security], [fs.h])
+                AC_CHECK_LINUX_STRUCT([file], [f_path], [fs.h])
                 AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h])
                 AC_CHECK_LINUX_STRUCT([file_operations], [iterate], [fs.h])
                 AC_CHECK_LINUX_STRUCT([file_operations], [read_iter], [fs.h])
index b98e9806b8a943638c4ad41676f3500364671e4c..53b78b7c7465a265751b56123425c36121817087 100644 (file)
@@ -41,6 +41,12 @@ typedef struct path afs_linux_path_t;
 # define d_alias d_u.d_alias
 #endif
 
+#if defined(STRUCT_FILE_HAS_F_PATH)
+# if !defined(f_dentry)
+#  define f_dentry f_path.dentry
+# endif
+#endif
+
 #ifndef HAVE_LINUX_DO_SYNC_READ
 static inline int
 do_sync_read(struct file *fp, char *buf, size_t count, loff_t *offp) {