In 2.6.32 vfs_readdir() calls file_accessed() which checks for
O_NOATIME and calls touch_atime() appropriately. In 3.11, the same is
true of iterate_dir(). Hence removed the call to touch_atime() in
ll_readdir(). Also, removed the HAVE_TOUCH_ATIME_1ARG and
HAVE_F_PATH_MNT autocrud since ll_readdir() was the last caller of
touch_atime() in the lustre tree.
Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: Iedd3be29adae80427d71a7eb5a0f8c0d1f1d2924
Reviewed-on: http://review.whamcloud.com/8664
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
-# 3.4 switchs touch_atime to struct path
-# see kernel commit 68ac1234fb949b66941d94dce4157742799fc581
-#
-AC_DEFUN([LC_TOUCH_ATIME_1ARG],
-[AC_MSG_CHECKING([if touch_atime use one argument])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- touch_atime((struct path *)NULL);
-],[
- AC_DEFINE(HAVE_TOUCH_ATIME_1ARG, 1,
- [touch_atime use one argument])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
# 3.4 converts d_alloc_root to d_make_root
# see kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b
#
# 3.4 converts d_alloc_root to d_make_root
# see kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b
#
-# 3.9 killed f_vfsmnt by
-# 182be684784334598eee1d90274e7f7aa0063616
-# replacement is f_path.mnt
-#
-AC_DEFUN([LC_HAVE_F_PATH_MNT],
-[AC_MSG_CHECKING([if struct file has f_path.mnt])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- struct file *fp = NULL;
- struct path path;
-
- path.mnt = fp->f_path.mnt;
-],[
- AC_DEFINE(HAVE_F_PATH_MNT,1,[yes])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
# 3.10+ only supports procfs seq_files handling
#
AC_DEFUN([LC_HAVE_ONLY_PROCFS_SEQ],
# 3.10+ only supports procfs seq_files handling
#
AC_DEFUN([LC_HAVE_ONLY_PROCFS_SEQ],
LC_HAVE_CACHE_REGISTER
# 3.4
LC_HAVE_CACHE_REGISTER
# 3.4
LC_HAVE_D_MAKE_ROOT
LC_KMAP_ATOMIC_HAS_1ARG
LC_HAVE_D_MAKE_ROOT
LC_KMAP_ATOMIC_HAS_1ARG
# 3.9
LC_HAVE_HLIST_FOR_EACH_3ARG
# 3.9
LC_HAVE_HLIST_FOR_EACH_3ARG
# 3.10
LC_HAVE_ONLY_PROCFS_SEQ
# 3.10
LC_HAVE_ONLY_PROCFS_SEQ
struct md_op_data *op_data;
__u64 pos;
int rc;
struct md_op_data *op_data;
__u64 pos;
int rc;
-#ifdef HAVE_TOUCH_ATIME_1ARG
- struct path path;
-#endif
ll_finish_md_op_data(op_data);
filp->f_version = inode->i_version;
ll_finish_md_op_data(op_data);
filp->f_version = inode->i_version;
-#ifdef HAVE_TOUCH_ATIME_1ARG
-#ifdef HAVE_F_PATH_MNT
- path.mnt = filp->f_path.mnt;
-#else
- path.mnt = filp->f_vfsmnt;
-#endif
- path.dentry = filp->f_dentry;
- touch_atime(&path);
-#else
- touch_atime(filp->f_vfsmnt, filp->f_dentry);
-#endif