mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +00:00
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 <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
b2433a3e4c
commit
e34702ef89
@ -51,7 +51,7 @@ afs_linux_raw_open(afs_dcache_id_t *ainode)
|
|||||||
osi_Panic("Can't get dentry\n");
|
osi_Panic("Can't get dentry\n");
|
||||||
tip = dp->d_inode;
|
tip = dp->d_inode;
|
||||||
#endif
|
#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)
|
#if defined(STRUCT_TASK_HAS_CRED)
|
||||||
/* Use stashed credentials - prevent selinux/apparmor problems */
|
/* Use stashed credentials - prevent selinux/apparmor problems */
|
||||||
|
@ -55,7 +55,12 @@ afs_linux_raw_open(afs_dcache_id_t *ainode)
|
|||||||
osi_Panic("Can't get dentry\n");
|
osi_Panic("Can't get dentry\n");
|
||||||
tip = dp->d_inode;
|
tip = dp->d_inode;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(S_NOATIME)
|
||||||
|
tip->i_flags |= S_NOATIME; /* Disable updating access times. */
|
||||||
|
#else
|
||||||
tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
|
tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(STRUCT_TASK_HAS_CRED)
|
#if defined(STRUCT_TASK_HAS_CRED)
|
||||||
filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred());
|
filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred());
|
||||||
|
Loading…
Reference in New Issue
Block a user