From dd2a3f8fa0e95c707121855c6d5acf01b2e1c855 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Mon, 18 May 2015 11:02:02 -0400 Subject: [PATCH 1/1] LU-6215 llite: cleanup inode_dio_XXX functions With the latest kernels inode_dio_done has been removed so remove it from the autoconf test for the presence of of inode_dio_wait. Besides inode_dio_done we can remove inode_dio_read which is no longer used. Change-Id: I97b7d926c246aebc19cc7747ba8846575f2aa06f Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/14664 Tested-by: Jenkins Reviewed-by: Dmitry Eremin Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Thomas Stibor Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 9 ++++----- lustre/include/lustre_compat.h | 4 ---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 0ee18aa..9a5d2b6 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -838,20 +838,19 @@ lock_manager_ops_lm_xxx, [ # # LC_INODE_DIO_WAIT # -# 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait/ -# inode_dio_done instead. +# 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait +# instead. # see kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3 # AC_DEFUN([LC_INODE_DIO_WAIT], [ -LB_CHECK_COMPILE([if 'inode->i_alloc_sem' is killed and use inode_dio_wait/done], +LB_CHECK_COMPILE([if 'inode->i_alloc_sem' is killed and use inode_dio_wait], inode_dio_wait, [ #include ],[ inode_dio_wait((struct inode *)0); - inode_dio_done((struct inode *)0); ],[ AC_DEFINE(HAVE_INODE_DIO_WAIT, 1, - [inode->i_alloc_sem is killed and use inode_dio_wait/done]) + [inode->i_alloc_sem is killed and use inode_dio_wait]) ]) ]) # LC_INODE_DIO_WAIT diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index 0c0dc918..4402683 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -123,13 +123,9 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, #ifdef HAVE_INODE_DIO_WAIT /* inode_dio_wait(i) use as-is for write lock */ # define inode_dio_write_done(i) do {} while (0) /* for write unlock */ -# define inode_dio_read(i) atomic_inc(&(i)->i_dio_count) -/* inode_dio_done(i) use as-is for read unlock */ #else # define inode_dio_wait(i) down_write(&(i)->i_alloc_sem) # define inode_dio_write_done(i) up_write(&(i)->i_alloc_sem) -# define inode_dio_read(i) down_read(&(i)->i_alloc_sem) -# define inode_dio_done(i) up_read(&(i)->i_alloc_sem) #endif #ifndef FS_HAS_FIEMAP -- 1.8.3.1