Skip to content

Commit f786aa9

Browse files
author
Al Viro
committed
constify dentry_operations: NFS
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent e56980d commit f786aa9

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎fs/nfs/dir.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
899899
iput(inode);
900900
}
901901

902-
struct dentry_operations nfs_dentry_operations = {
902+
const struct dentry_operations nfs_dentry_operations = {
903903
.d_revalidate = nfs_lookup_revalidate,
904904
.d_delete = nfs_dentry_delete,
905905
.d_iput = nfs_dentry_iput,
@@ -967,7 +967,7 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru
967967
#ifdef CONFIG_NFS_V4
968968
static int nfs_open_revalidate(struct dentry *, struct nameidata *);
969969

970-
struct dentry_operations nfs4_dentry_operations = {
970+
const struct dentry_operations nfs4_dentry_operations = {
971971
.d_revalidate = nfs_open_revalidate,
972972
.d_delete = nfs_dentry_delete,
973973
.d_iput = nfs_dentry_iput,

‎fs/nfs/nfs4_fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ struct nfs4_state_recovery_ops {
179179
int (*recover_lock)(struct nfs4_state *, struct file_lock *);
180180
};
181181

182-
extern struct dentry_operations nfs4_dentry_operations;
182+
extern const struct dentry_operations nfs4_dentry_operations;
183183
extern const struct inode_operations nfs4_dir_inode_operations;
184184

185185
/* inode.c */

‎include/linux/nfs_fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ extern const struct inode_operations nfs_dir_inode_operations;
415415
extern const struct inode_operations nfs3_dir_inode_operations;
416416
#endif /* CONFIG_NFS_V3 */
417417
extern const struct file_operations nfs_dir_operations;
418-
extern struct dentry_operations nfs_dentry_operations;
418+
extern const struct dentry_operations nfs_dentry_operations;
419419

420420
extern void nfs_force_lookup_revalidate(struct inode *dir);
421421
extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr);

‎include/linux/nfs_xdr.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ struct nfs_access_entry;
785785
*/
786786
struct nfs_rpc_ops {
787787
u32 version; /* Protocol version */
788-
struct dentry_operations *dentry_ops;
788+
const struct dentry_operations *dentry_ops;
789789
const struct inode_operations *dir_inode_ops;
790790
const struct inode_operations *file_inode_ops;
791791

0 commit comments

Comments
 (0)