diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index 9b9aa37144..f5e21d563a 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -56,6 +56,8 @@ afs_linux_raw_open(afs_dcache_id_t *ainode) #if defined(STRUCT_TASK_HAS_CRED) /* Use stashed credentials - prevent selinux/apparmor problems */ filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, cache_creds); + if (IS_ERR(filp)) + filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred()); #else filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR); #endif