Skip to content

Commit e16404e

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

18 files changed

Lines changed: 22 additions & 23 deletions

File tree

‎fs/adfs/adfs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void __adfs_error(struct super_block *sb, const char *function,
8686
/* dir_*.c */
8787
extern const struct inode_operations adfs_dir_inode_operations;
8888
extern const struct file_operations adfs_dir_operations;
89-
extern struct dentry_operations adfs_dentry_operations;
89+
extern const struct dentry_operations adfs_dentry_operations;
9090
extern struct adfs_dir_ops adfs_f_dir_ops;
9191
extern struct adfs_dir_ops adfs_fplus_dir_ops;
9292

‎fs/adfs/dir.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ adfs_compare(struct dentry *parent, struct qstr *entry, struct qstr *name)
263263
return 0;
264264
}
265265

266-
struct dentry_operations adfs_dentry_operations = {
266+
const struct dentry_operations adfs_dentry_operations = {
267267
.d_hash = adfs_hash,
268268
.d_compare = adfs_compare,
269269
};

‎fs/affs/affs.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ extern const struct address_space_operations affs_symlink_aops;
199199
extern const struct address_space_operations affs_aops;
200200
extern const struct address_space_operations affs_aops_ofs;
201201

202-
extern struct dentry_operations affs_dentry_operations;
203-
extern struct dentry_operations affs_dentry_operations_intl;
202+
extern const struct dentry_operations affs_dentry_operations;
204203

205204
static inline void
206205
affs_set_blocksize(struct super_block *sb, int size)

‎fs/affs/namei.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ static int affs_intl_toupper(int ch);
1919
static int affs_intl_hash_dentry(struct dentry *, struct qstr *);
2020
static int affs_intl_compare_dentry(struct dentry *, struct qstr *, struct qstr *);
2121

22-
struct dentry_operations affs_dentry_operations = {
22+
const struct dentry_operations affs_dentry_operations = {
2323
.d_hash = affs_hash_dentry,
2424
.d_compare = affs_compare_dentry,
2525
};
2626

27-
static struct dentry_operations affs_intl_dentry_operations = {
27+
static const struct dentry_operations affs_intl_dentry_operations = {
2828
.d_hash = affs_intl_hash_dentry,
2929
.d_compare = affs_intl_compare_dentry,
3030
};

‎fs/coda/dir.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int coda_return_EIO(void)
5959
}
6060
#define CODA_EIO_ERROR ((void *) (coda_return_EIO))
6161

62-
static struct dentry_operations coda_dentry_operations =
62+
static const struct dentry_operations coda_dentry_operations =
6363
{
6464
.d_revalidate = coda_dentry_revalidate,
6565
.d_delete = coda_dentry_delete,

‎fs/hfs/hfs_fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ extern void hfs_mdb_put(struct super_block *);
213213
extern int hfs_part_find(struct super_block *, sector_t *, sector_t *);
214214

215215
/* string.c */
216-
extern struct dentry_operations hfs_dentry_operations;
216+
extern const struct dentry_operations hfs_dentry_operations;
217217

218218
extern int hfs_hash_dentry(struct dentry *, struct qstr *);
219219
extern int hfs_strcmp(const unsigned char *, unsigned int,

‎fs/hfs/sysdep.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static int hfs_revalidate_dentry(struct dentry *dentry, struct nameidata *nd)
3131
return 1;
3232
}
3333

34-
struct dentry_operations hfs_dentry_operations =
34+
const struct dentry_operations hfs_dentry_operations =
3535
{
3636
.d_revalidate = hfs_revalidate_dentry,
3737
.d_hash = hfs_hash_dentry,

‎fs/hfsplus/hfsplus_fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ void hfsplus_file_truncate(struct inode *);
327327
/* inode.c */
328328
extern const struct address_space_operations hfsplus_aops;
329329
extern const struct address_space_operations hfsplus_btree_aops;
330-
extern struct dentry_operations hfsplus_dentry_operations;
330+
extern const struct dentry_operations hfsplus_dentry_operations;
331331

332332
void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *);
333333
void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *);

‎fs/hfsplus/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const struct address_space_operations hfsplus_aops = {
137137
.writepages = hfsplus_writepages,
138138
};
139139

140-
struct dentry_operations hfsplus_dentry_operations = {
140+
const struct dentry_operations hfsplus_dentry_operations = {
141141
.d_hash = hfsplus_hash_dentry,
142142
.d_compare = hfsplus_compare_dentry,
143143
};

‎fs/hostfs/hostfs_kern.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ static inline struct hostfs_inode_info *HOSTFS_I(struct inode *inode)
3131

3232
#define FILE_HOSTFS_I(file) HOSTFS_I((file)->f_path.dentry->d_inode)
3333

34-
int hostfs_d_delete(struct dentry *dentry)
34+
static int hostfs_d_delete(struct dentry *dentry)
3535
{
3636
return 1;
3737
}
3838

39-
struct dentry_operations hostfs_dentry_ops = {
39+
static const struct dentry_operations hostfs_dentry_ops = {
4040
.d_delete = hostfs_d_delete,
4141
};
4242

0 commit comments

Comments
 (0)