mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 13:06:39 +07:00
754661f143
Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
27 lines
845 B
C
27 lines
845 B
C
/* -*- linux-c -*- --------------------------------------------------------- *
|
|
*
|
|
* linux/fs/autofs/symlink.c
|
|
*
|
|
* Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
|
|
*
|
|
* This file is part of the Linux kernel and is made available under
|
|
* the terms of the GNU General Public License, version 2, or at your
|
|
* option, any later version, incorporated herein by reference.
|
|
*
|
|
* ------------------------------------------------------------------------- */
|
|
|
|
#include "autofs_i.h"
|
|
|
|
/* Nothing to release.. */
|
|
static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd)
|
|
{
|
|
char *s=((struct autofs_symlink *)dentry->d_inode->i_private)->data;
|
|
nd_set_link(nd, s);
|
|
return NULL;
|
|
}
|
|
|
|
const struct inode_operations autofs_symlink_inode_operations = {
|
|
.readlink = generic_readlink,
|
|
.follow_link = autofs_follow_link
|
|
};
|