From: Simon Wilkinson Date: Wed, 6 Jan 2010 15:12:32 +0000 (+0000) Subject: Linux: Use the correct ATIME flag X-Git-Tag: openafs-devel-1_5_69~46 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e34702ef89649df47745121f45df32bec1f2fccb;p=packages%2Fo%2Fopenafs.git Linux: Use the correct ATIME flag Since Linux kernel 2.4.0, MS_NOATIME has been a super block flag, and S_NOATIME has been the corresponding inode flag. Use the correct flag when we're opening cache files. FIXES 126084 Change-Id: I69cbcd651584cc86568c51793dd3f6d3e8644709 Reviewed-on: http://gerrit.openafs.org/1070 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index 7af6b6d71..c15982307 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -51,7 +51,7 @@ afs_linux_raw_open(afs_dcache_id_t *ainode) osi_Panic("Can't get dentry\n"); tip = dp->d_inode; #endif - tip->i_flags |= MS_NOATIME; /* Disable updating access times. */ + tip->i_flags |= S_NOATIME; /* Disable updating access times. */ #if defined(STRUCT_TASK_HAS_CRED) /* Use stashed credentials - prevent selinux/apparmor problems */ diff --git a/src/afs/LINUX24/osi_file.c b/src/afs/LINUX24/osi_file.c index ba58d051b..8e965957c 100644 --- a/src/afs/LINUX24/osi_file.c +++ b/src/afs/LINUX24/osi_file.c @@ -55,7 +55,12 @@ afs_linux_raw_open(afs_dcache_id_t *ainode) osi_Panic("Can't get dentry\n"); tip = dp->d_inode; #endif + +#if defined(S_NOATIME) + tip->i_flags |= S_NOATIME; /* Disable updating access times. */ +#else tip->i_flags |= MS_NOATIME; /* Disable updating access times. */ +#endif #if defined(STRUCT_TASK_HAS_CRED) filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred());